underscore
underscore copied to clipboard
Would love to see a guid or similar function
uniqueId isn't suitable for server side unique id's .
Mornin' @qbert65536! You're right, _.uniqueId is not suitable as a uuid/guid. It's main use is intended for the client side where the number of ids will be relatively small (less the the size of an integer). Creating spec-compliant uuids/guids is out of scope for Underscore and should be done with a third party library. I've used node-uuid before to good effect (also usable in the browser).