locally-unique-id-generator
Version:
trivial generator for ids which are unique within an application
3 lines (2 loc) • 538 B
JavaScript
!function(n,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(n="undefined"!=typeof globalThis?globalThis:n||self,function(){var t=n.newUniqueId,i=n.newUniqueId=e();i.noConflict=function(){return n.newUniqueId=t,i}}())}(this,(function(){"use strict";var n=0;var e=Function("return this")();return"function"!=typeof e.__nextId&&(e.__nextId=function(){return++n}),function(){return"uid-"+e.__nextId()}}));
//# sourceMappingURL=locally-unique-id-generator.umd.js.map