XID.js
XID.js is a loose port of github.com/rs/xid to JavaScript. This implementation currently assumes little endian.
XID seed providers
Due to brower-side security and privacy, the XIDs assumption of having a readable process ID and machine ID is unavailable on the client. Thus, we are unable to fully compute a unique ID using just a barebones XID implemenation. To facilitate generating an unique ID, the XID seed provider has been split off into its own module that can be overridden at build time.
There are 2 implementation examples:
Webpack v2 Override Settings
In webpack v2, use the resolve.alias
setting to override the default xid-js-seed
implementation.
{
resolve: {
extensions: ['.js'],
symlinks: false,
alias: {
"xid-js-seed": __dirname + "/test/seed.test.js"
},
},
...
}