XID.js ================================


1.1.04 years ago4 years agoMinified + gzip package size for @publica/xid-js in KB



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 + "/node_modules/@publica/xid-js-random/dist/seed"
            "xid-js-seed": __dirname + "/test/seed.test.js"

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.