uid.js 278 B

123456789
  1. var uncurryThis = require('../internals/function-uncurry-this');
  2. var id = 0;
  3. var postfix = Math.random();
  4. var toString = uncurryThis(1.0.toString);
  5. module.exports = function (key) {
  6. return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
  7. };