Closed mike-aungsan closed 11 years ago
module.exports = (function() {
I try the following. only slug(), and fingerprint return 5 chars.
How do I get longer one?
Regards,
var cuid = require('cuid'); var id = new cuid();
return function(req, res, next) {
console.log('cuid module'); //console.log(cuid); //console.log(id); //console.log(cuid.fingerprint()); // short, 5 chars //console.log(cuid.slug()); // work, short one console.log(cuid.cuid()); //console.log(cuid.nodePrint()); console.log(id.cuid()); //console.log(id.fingerprint()); //console.log(id.slug()); // work, short one //console.log(id.nodePrint()); next();
}
})();
Looks like you tried everything except:
var cuid = require('cuid'); console.log( cuid() );
Thanks lots.
I updated the doc. Thanks for asking. =)
module.exports = (function() {
I try the following. only slug(), and fingerprint return 5 chars.
How do I get longer one?
Regards,
var cuid = require('cuid'); var id = new cuid();
return function(req, res, next) {
}
})();