A collection of methods to be used as underscore mixins
npm install underscore-mixins
    
A collection of methods to be used as underscore mixins
``coffeescript`
_ = require 'underscore'
_.mixin require('underscore-mixins')
`coffeescript`
obj = {...} # some object with nested values
cloned = _.deepClone(obj)
`coffeescript`
obj = foo: 'bar'
pretty = _.prettify(obj) # you can pass the indentation value as optional 2nd argument (default 2)=>
"{
"foo": "bar"
}"
> If the argument is not a JSON object, the argument itself is returned (also for Error instances)
`coffeescript`
value = _.percentage(30, 500)=> 6
`coffeescript`
params =
where: encodeURIComponent('name = "Foo"')
staged: true
limit: 100
offset: 2
_.stringifyQuery(params)=> 'where=name%20%3D%20%22Foo%22&staged=true&limit=100&offset=2'
`coffeescript`
query = 'where=name%20%3D%20%22Foo%22&staged=true&limit=100&offset=2'
_.parseQuery(query)=> {where: 'name%20%3D%20%22Foo%22', staged: 'true', limit: '100', offset: '2'}
You can pass a hasUniqueParams as second argument to determine the parsing strategy in case of multiple parameters with the same key:true
- (default): same parameter key will be overriddenfalse
- : same parameters values will be put in an array
`coffeescript`
query = 'foo=bar1&foo=bar2'=> {foo: ['bar1', 'bar2']}
`coffeescript`
list = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0]
_.batchList(list, 3)=> [[1, 2, 3], [4, 5, 6], [7, 8, 9], [0]]
.`javascript
grunt release // patch release
grunt release:minor // minor release
grunt release:major // major release
``