1.1.0 • Published 7 years ago

@publica/xid-js v1.1.0

Weekly downloads
49
License
UNLICENSED
Repository
github
Last release
7 years ago

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

7 years ago

1.1.0-2

7 years ago

1.1.0-1

7 years ago

1.0.1

7 years ago

1.0.1-0

7 years ago

1.0.0

7 years ago