This package has been deprecated

Author message:

module unsupported: @publica/xid-js

@publica/xid-js
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

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"
        },
    },
    ...
}

Readme

Keywords

none

Package Sidebar

Install

npm i @publica/xid-js

Weekly Downloads

4

Version

1.1.0

License

UNLICENSED

Last publish

Collaborators

  • bretkikehara
  • kalbasit
  • publica-ci