Last Updated: February 25, 2016
·
5.897K
· sheerun

♨ Sugar.js your CoffeeScript

Picture

I encourage you to use sugar.js in your application (but not library) as an alternative to underscore.js. It'll make your code clean, especially if you're using CoffeeScript.

One concern is polluting prototypes of native objects, but Sugar.js leaves Object's prototype intact, and in practice methods it adds to other natives will never break other code.

Additionally, if you're messing with JavaScript Date and Time objects, I suggest using date.js (it has awesome and Sugar.js-compatible API).

Have a fresh tip? Share with Coderwall community!

Post
Post a tip
Did you know?

JavaScript on a page runs with the privileges of that origin. One altered library, tag manager, or snippet can read inputs, change what people see, and call your APIs as the user.

Security insights from Cside