A small JavaScript library to generate YouTube-like ids from numbers.

Overview

hashids

Build Status Coveralls Status NPM downloads NPM version License Chat

Hashids is small JavaScript library to generate YouTube-like ids from numbers. Use it when you don't want to expose your database ids to the user: http://hashids.org/javascript

Play with it using CodeSandbox

Getting started

Install Hashids via:

yarn add hashids

(or just directly use the code at dist/hashids.js)

Use in ESM-compatible environments (webpack, modern browsers)

import Hashids from 'hashids'
const hashids = new Hashids()

console.log(hashids.encode(1))

Use in CommonJS environments (most often Node.js)

const Hashids = require('hashids/cjs')
const hashids = new Hashids()

console.log(hashids.encode(1))

Note: When using Node that supports conditional exports, require('hashids') (version >=13) will also work.

Use as global in the browser (wherever ES6 is supported; 5KB)

<script type="text/javascript" src="hashids.min.js"></script>
<script type="text/javascript">

    var hashids = new Hashids();
    console.log(hashids.encode(1));

</script>

Use in TypeScript:

import or require, based on the environment (see above). If you want to use the CommonJS module syntax (require), you'll need to install the Node.js types from the DefinitelyTyped repository.

npm install @types/node

If you want to use the ESM syntax (import Hashids from 'hashids'), you will need to include the following options in your tsconfig.json.

{
  "allowSyntheticDefaultImports": true,
  "esModuleInterop": true
}

The above is not required if you import the CommonJS version directly: import Hashids from 'hashids/cjs'.

If you get errors stating: Cannot find name 'BigInt', add "esnext.bigint" or "esnext" to your tsconfig.json file, under "lib":

{
  "compilerOptions": {
    ...
    "lib": [
      "esnext.bigint",
      ...
    ]
  }
}

Note that your environment doesn't actually have to support BigInt for hashids to function.

Quick example

const hashids = new Hashids()

const id = hashids.encode(1, 2, 3) // o2fXhV
const numbers = hashids.decode(id) // [1, 2, 3]

More options

A few more ways to pass to encode():

const hashids = new Hashids()

console.log(hashids.encode(1, 2, 3)) // o2fXhV
console.log(hashids.encode([1, 2, 3])) // o2fXhV
// strings containing integers are coerced to numbers:
console.log(hashids.encode('1', '2', '3')) // o2fXhV
console.log(hashids.encode(['1', '2', '3'])) // o2fXhV
// BigInt support:
console.log(hashids.encode([1n, 2n, 3n])) // o2fXhV
// Hex notation BigInt:
console.log(hashids.encode([0x1n, 0x2n, 0x3n])) // o2fXhV

Make your ids unique:

Pass a "salt" to make your ids unique (e.g. a project name):

var hashids = new Hashids('My Project')
console.log(hashids.encode(1, 2, 3)) // Z4UrtW

var hashids = new Hashids('My Other Project')
console.log(hashids.encode(1, 2, 3)) // gPUasb

Use padding to make your ids longer:

Note that ids are only padded to fit at least a certain length. It doesn't mean that your ids will be exactly that length.

const hashids = new Hashids() // no padding
console.log(hashids.encode(1)) // jR

const hashids = new Hashids('', 10) // pad to length 10
console.log(hashids.encode(1)) // VolejRejNm

Pass a custom alphabet:

const hashids = new Hashids('', 0, 'abcdefghijklmnopqrstuvwxyz') // all lowercase
console.log(hashids.encode(1, 2, 3)) // mdfphx

Default alphabet is abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890.

Since v2.0 you can even use emojis as the alphabet.

Encode hex instead of numbers:

Useful if you want to encode numbers like Mongo's ObjectIds.

Note that there is no limit on how large of a hex number you can pass.

var hashids = new Hashids()

var id = hashids.encodeHex('507f1f77bcf86cd799439011') // y42LW46J9luq3Xq9XMly
var hex = hashids.decodeHex(id) // 507f1f77bcf86cd799439011

Please note that this is not the equivalent of:

const hashids = new Hashids()

const id = Hashids.encode(BigInt('0x507f1f77bcf86cd799439011')) // y8qpJL3ZgzJ8lWk4GEV
const hex = Hashids.decode(id)[0].toString(16) // 507f1f77bcf86cd799439011

The difference between the two is that the built-in encodeHex will always result in the same length, even if it contained leading zeros.

For example hashids.encodeHex('00000000') would encode to qExOgK7 and decode back to '00000000' (length information is preserved).

Pitfalls

  1. When decoding, output is always an array of numbers (even if you encode only one number):

    const hashids = new Hashids()
    
    const id = hashids.encode(1)
    console.log(hashids.decode(id)) // [1]
  2. Encoding negative numbers is not supported.

  3. If you pass bogus input to encode(), an empty string will be returned:

    const hashids = new Hashids()
    
    const id = hashids.encode('123a')
    console.log(id === '') // true
  4. Do not use this library as a security tool and do not encode sensitive data. This is not an encryption library.

Randomness

The primary purpose of Hashids is to obfuscate ids. It's not meant or tested to be used as a security or compression tool. Having said that, this algorithm does try to make these ids random and unpredictable:

No repeating patterns showing there are 3 identical numbers in the id:

const hashids = new Hashids()
console.log(hashids.encode(5, 5, 5)) // A6t1tQ

Same with incremented numbers:

const hashids = new Hashids()

console.log(hashids.encode(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)) // wpfLh9iwsqt0uyCEFjHM

console.log(hashids.encode(1)) // jR
console.log(hashids.encode(2)) // k5
console.log(hashids.encode(3)) // l5
console.log(hashids.encode(4)) // mO
console.log(hashids.encode(5)) // nR

Curses! #$%@

This code was written with the intent of placing created ids in visible places, like the URL. Therefore, by default the algorithm tries to avoid generating most common English curse words by generating ids that never have the following letters next to each other:

c, f, h, i, s, t, u

You may customize the chars that shouldn't be placed next to each other by providing a 4th argument to the Hashids constructor:

// first 4 arguments will fallback to defaults (empty salt, no minimum length, default alphabet)
const hashids = new Hashids(undefined, undefined, undefined, 'zyxZYX')

BigInt

If your environment supports BigInt, you can use the standard API to encode and decode them the same way as ordinary numbers.

Trying to decode a BigInt-encoded hashid on an unsupported environment will throw an error.

License

MIT License. See the LICENSE file. You can use Hashids in open source projects and commercial products. Don't break the Internet. Kthxbye.

Comments
  • No default export in Node (immediately overwritten)

    No default export in Node (immediately overwritten)

    Hi @ivanakimov.

    The code generated here is quite odd. It proceeds to set the default export as Hashids class, and immediately after overwrites the exports with the same, previously defined default export. The result is that there is no default export for ES6, but only a root CommonJS export.

    This will of course work if you use something like babel, which emits an interop between default (ES6) and root exports, but will not work if you consume the code directly, e.g. from Node or TypeScript.

    A backwards compatible fix would be to add a 'default' property to the class, which points to itself.

    help wanted 
    opened by niieani 17
  • Custom curse list / seps

    Custom curse list / seps

    Can an argument be added to override the default hardcoded sep list of characters, or better yet, do a check against a full custom curse list? The sep list character removal may cause estimates of the number of characters needed to be wrong. A custom curse list would also allow non-English speakers to avoid curses in other languages.

    feature request released 
    opened by dshivak 15
  • Add BigInt support

    Add BigInt support

    As a proposal it would be helpfull to have calls to handle bigint in case of handling Big Integer Ids from a DB.

    I implemented initially using npm big-integer library.

    I also implemented as a complementary library on my repository hashids-bigint.

    This library is not yet published to npm, because I believe it would be better to have support in the same library.

    Let me know what do you think, I undestand that adding an optional dependency might not be desirable.

    Possible solutions:

    • It can be implemented to support javascript native bigint but this might be too new.
    • It can be implemented as required dependency.
    released 
    opened by prodrigestivill 13
  • Performance degradation in v2 compared to 1.2.2

    Performance degradation in v2 compared to 1.2.2

    Old package performance image v2 version performance image

    The new version is 5 times less performant. Not sure if you're worried of performance on that scale, just wanted to let you know. I'll be still using old version because of this reason. Thanks

    help wanted released 
    opened by svtokarevsv 12
  • Adds .npmignore

    Adds .npmignore

    Took the approach that dist belongs in source but not in package manager (~if it's not being used, which in this case it is not~*), but you may have diff feels on that.

    If so, can just edit** or remove L8. As is:

    Before

    npm notice === Tarball Details ===
    npm notice name:          hashids
    npm notice version:       1.2.2
    npm notice package size:  19.1 kB
    npm notice unpacked size: 94.8 kB
    npm notice shasum:        8c2b36a4559430c90e466b3b7519f3c2862909d6
    npm notice integrity:     sha512-jp+XlsrjkdcEm[...]drOEUTA5qUTsQ==
    npm notice total files:   13
    

    After

    npm notice === Tarball Details ===
    npm notice name:          hashids
    npm notice version:       1.2.2
    npm notice package size:  7.5 kB
    npm notice unpacked size: 20.6 kB
    npm notice shasum:        9160e6576f8f8121bb9f9f82d3435b99ee21717a
    npm notice integrity:     sha512-65lWfP6p8Yopr[...]rOFokk++h2Dww==
    npm notice total files:   5
    

    *Update: that was wrong, it is! (Just not by my use case.) **Suggest at least consider npmignoring .maps

    opened by ryanblock 11
  • Is

    Is "minAlphabetLength = 16" required?

    I tried only use numbers as alphabet, and seems worked:

    coffee> hashids = new hashids "aaa", 9, "0123456789"
    { version: '0.3.3',
      minAlphabetLength: 2,
      sepDiv: 3.5,
      guardDiv: 12,
      errorAlphabetLength: 'error: alphabet must contain at least X unique characters',
      errorAlphabetSpace: 'error: alphabet cannot contain spaces',
      alphabet: '347895',
      seps: '012',
      minHashLength: 9,
      salt: 'aaa',
      guards: '6' }
    coffee> hashids.encrypt 1
    '547645689'
    coffee> hashids.decrypt '547645689'
    [ 1 ]
    

    Are there some implicit requirements in algorithm?

    opened by liukun 9
  • Using for react-native

    Using for react-native

    I just remove the .babelrc and it work.. I'm not sure how to suggest to patch.

    
    var Hashids = require('hashids');
    var userHash = new Hashids(your_hash);
    console.log(userHash.encode("test"))
    
    

    I try to use the import but failed.. but as long it work using old require.. okay

    opened by alien3d 8
  • hashids/cjs does not work with webpack 5

    hashids/cjs does not work with webpack 5

    Webpack 5 has an ExportFieldPlugin (https://github.com/webpack/enhanced-resolve/pull/214/files) but it seems to be looking for "default" or "browser" instead of "import" or "require" and hence the "./cjs" export does not work. If we can add a "default" entry to "./cjs" export in package.json, it will work with webpack 5. v2.1.0 still works since it does not have the import/require fields.

    released 
    opened by jsiddiqui 7
  • Improve documentation about how to import in Typescript+Node<13.11

    Improve documentation about how to import in Typescript+Node<13.11

    Hi, im trying to use Hashids with Typescript and Node.

    import Hashids from 'hashids';

    I'm not getting any Typescript errors in the editor, but Im getting this error when the code is compiled.

    Using ts-node version 8.5.4, typescript version 3.7.5

    Error: No valid exports main found for 'node_modules\hashids' at resolveExportsTarget (internal/modules/cjs/loader.js:625:9) at applyExports (internal/modules/cjs/loader.js:502:14) at resolveExports (internal/modules/cjs/loader.js:551:12) at Function.Module._findPath (internal/modules/cjs/loader.js:657:22) at Function.Module._resolveFilename (internal/modules/cjs/loader.js:960:27) at Function.Module._load (internal/modules/cjs/loader.js:855:27) at Module.require (internal/modules/cjs/loader.js:1033:19) at require (internal/modules/cjs/helpers.js:72:18) at Object.<anonymous> (encodeID.ts:1:1) at Module._compile (internal/modules/cjs/loader.js:1144:30) [ERROR] 18:03:43 Error: No valid exports main found for 'node_modules\hashids'

    Thanks!

    released good first issue 
    opened by peps 7
  • fixed issue with sourceMappingURL in hashids.min.js

    fixed issue with sourceMappingURL in hashids.min.js

    fixed the issue with hashids.min.js not correctly referencing hashids.min.map

    this was causing webpack to output a warning when hashids was part of the bundle

    WARNING in ./node_modules/source-map-loader!./node_modules/hashids/dist/hashids.min.js
    (Emitted value instead of an instance of Error) Cannot find SourceMap 'dist/hashids.min.map': Error: Can't resolve './dist/hashids.min.map' in '/<project-path>/node_modules/hashids/dist'
     @ ./node_modules/hashids/dist/hashids.min.js 1:37-146
     @ ./app/index.js
    

    *the <project-path> is the absolute path to the project

    opened by rdfriedl 7
  • question about guessing multiple valid hashids given one valid hashid

    question about guessing multiple valid hashids given one valid hashid

    I have noticed a pattern with hashids where if you have one hashid, you can easily find other hashids by removing individual characters.

    For example, with a particular salt i generate a hashid jnmq4r. Using that hashid, if I remove characters from the string and try to decode those shorter strings, i get a valid number.

    for example:

    |hashid|decoded number| |-|-| |jnmq4r| 214003| |jmq4r| 54003| |jnq4r|14003| |jnm4r| 10403| |jnmqr|10703| |jn4r|403| |jq4r|6003|

    This means that if a user is given a hashid, they can easily guess numerous other valid hashids. It also means that if i want to do a quick check that a typed string is a valid hashid that can be mapped back to an integer using our salt, and there is a typo where a single letter is omitted, there is a very high probability that the error will not be detected.

    I get that hashids are not meant to be cryptograhically secure or strong, but I need something where given a set of valid codes it is still somewhat difficult go guess or generate additional valid codes.

    Is there any way I can still accomplish this with hashids, or do I need to go looking somewhere else?

    opened by jaufgang 7
  • build(deps): bump actions/cache from 3.0.5 to 3.2.1

    build(deps): bump actions/cache from 3.0.5 to 3.2.1

    Bumps actions/cache from 3.0.5 to 3.2.1.

    Release notes

    Sourced from actions/cache's releases.

    v3.2.1

    What's Changed

    Full Changelog: https://github.com/actions/cache/compare/v3.2.0...v3.2.1

    v3.2.0

    What's Changed

    New Contributors

    Full Changelog: https://github.com/actions/cache/compare/v3...v3.2.0

    v3.2.0-beta.1

    What's Changed

    v3.1.0-beta.3

    What's Changed

    • Bug fixes for bsdtar fallback, if gnutar not available, and gzip fallback, if cache saved using old cache action, on windows.

    Full Changelog: https://github.com/actions/cache/compare/v3.1.0-beta.2...v3.1.0-beta.3

    ... (truncated)

    Changelog

    Sourced from actions/cache's changelog.

    3.0.5

    • Removed error handling by consuming actions/cache 3.0 toolkit, Now cache server error handling will be done by toolkit. (PR)

    3.0.6

    • Fixed #809 - zstd -d: no such file or directory error
    • Fixed #833 - cache doesn't work with github workspace directory

    3.0.7

    • Fixed #810 - download stuck issue. A new timeout is introduced in the download process to abort the download if it gets stuck and doesn't finish within an hour.

    3.0.8

    • Fix zstd not working for windows on gnu tar in issues #888 and #891.
    • Allowing users to provide a custom timeout as input for aborting download of a cache segment using an environment variable SEGMENT_DOWNLOAD_TIMEOUT_MINS. Default is 60 minutes.

    3.0.9

    • Enhanced the warning message for cache unavailablity in case of GHES.

    3.0.10

    • Fix a bug with sorting inputs.
    • Update definition for restore-keys in README.md

    3.0.11

    • Update toolkit version to 3.0.5 to include @actions/core@^1.10.0
    • Update @actions/cache to use updated saveState and setOutput functions from @actions/core@^1.10.0

    3.1.0-beta.1

    • Update @actions/cache on windows to use gnu tar and zstd by default and fallback to bsdtar and zstd if gnu tar is not available. (issue)

    3.1.0-beta.2

    • Added support for fallback to gzip to restore old caches on windows.

    3.1.0-beta.3

    • Bug fixes for bsdtar fallback if gnutar not available and gzip fallback if cache saved using old cache action on windows.

    3.2.0-beta.1

    • Added two new actions - restore and save for granular control on cache.

    3.2.0

    • Released the two new actions - restore and save for granular control on cache

    3.2.1

    • Update @actions/cache on windows to use gnu tar and zstd by default and fallback to bsdtar and zstd if gnu tar is not available. (issue)
    • Added support for fallback to gzip to restore old caches on windows.
    • Added logs for cache version in case of a cache miss.
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies github_actions 
    opened by dependabot[bot] 0
  • build(deps): bump qs from 6.5.2 to 6.5.3

    build(deps): bump qs from 6.5.2 to 6.5.3

    Bumps qs from 6.5.2 to 6.5.3.

    Changelog

    Sourced from qs's changelog.

    6.5.3

    • [Fix] parse: ignore __proto__ keys (#428)
    • [Fix] utils.merge: avoid a crash with a null target and a truthy non-array source
    • [Fix] correctly parse nested arrays
    • [Fix] stringify: fix a crash with strictNullHandling and a custom filter/serializeDate (#279)
    • [Fix] utils: merge: fix crash when source is a truthy primitive & no options are provided
    • [Fix] when parseArrays is false, properly handle keys ending in []
    • [Fix] fix for an impossible situation: when the formatter is called with a non-string value
    • [Fix] utils.merge: avoid a crash with a null target and an array source
    • [Refactor] utils: reduce observable [[Get]]s
    • [Refactor] use cached Array.isArray
    • [Refactor] stringify: Avoid arr = arr.concat(...), push to the existing instance (#269)
    • [Refactor] parse: only need to reassign the var once
    • [Robustness] stringify: avoid relying on a global undefined (#427)
    • [readme] remove travis badge; add github actions/codecov badges; update URLs
    • [Docs] Clean up license text so it’s properly detected as BSD-3-Clause
    • [Docs] Clarify the need for "arrayLimit" option
    • [meta] fix README.md (#399)
    • [meta] add FUNDING.yml
    • [actions] backport actions from main
    • [Tests] always use String(x) over x.toString()
    • [Tests] remove nonexistent tape option
    • [Dev Deps] backport from main
    Commits
    • 298bfa5 v6.5.3
    • ed0f5dc [Fix] parse: ignore __proto__ keys (#428)
    • 691e739 [Robustness] stringify: avoid relying on a global undefined (#427)
    • 1072d57 [readme] remove travis badge; add github actions/codecov badges; update URLs
    • 12ac1c4 [meta] fix README.md (#399)
    • 0338716 [actions] backport actions from main
    • 5639c20 Clean up license text so it’s properly detected as BSD-3-Clause
    • 51b8a0b add FUNDING.yml
    • 45f6759 [Fix] fix for an impossible situation: when the formatter is called with a no...
    • f814a7f [Dev Deps] backport from main
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the Security Alerts page.
    dependencies javascript 
    opened by dependabot[bot] 0
  • build(deps): bump decode-uri-component from 0.2.0 to 0.2.2

    build(deps): bump decode-uri-component from 0.2.0 to 0.2.2

    Bumps decode-uri-component from 0.2.0 to 0.2.2.

    Release notes

    Sourced from decode-uri-component's releases.

    v0.2.2

    • Prevent overwriting previously decoded tokens 980e0bf

    https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.1...v0.2.2

    v0.2.1

    • Switch to GitHub workflows 76abc93
    • Fix issue where decode throws - fixes #6 746ca5d
    • Update license (#1) 486d7e2
    • Tidelift tasks a650457
    • Meta tweaks 66e1c28

    https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.1

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the Security Alerts page.
    dependencies javascript 
    opened by dependabot[bot] 0
  • build(deps): bump actions/setup-node from 3.4.1 to 3.5.1

    build(deps): bump actions/setup-node from 3.4.1 to 3.5.1

    Bumps actions/setup-node from 3.4.1 to 3.5.1.

    Release notes

    Sourced from actions/setup-node's releases.

    Update @​actions/core and Print Node, Npm, Yarn versions

    In scope of this release we updated actions/core to 1.10.0. Moreover, we added logic to print Nodejs, Npm, Yarn versions after installation.

    Add support for engines.node and Volta

    In scope of this release we add support for engines.node. The action will be able to grab the version form package.json#engines.node. actions/setup-node#485. Moreover, we added support for Volta

    Besides, we updated @​actions/core to 1.9.1 and @​actions/cache to 3.0.4

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies github_actions 
    opened by dependabot[bot] 0
  • chore(deps): update dependency @niieani/scaffold to ^1.5.21

    chore(deps): update dependency @niieani/scaffold to ^1.5.21

    Mend Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | @niieani/scaffold | ^1.5.13 -> ^1.5.21 | age | adoption | passing | confidence |


    Release Notes

    niieani/scaffold

    v1.5.21

    Compare Source

    @​niieani/scaffold 1.5.21 (2022-11-07)

    Bug Fixes

    v1.5.20

    Compare Source

    @​niieani/scaffold 1.5.20 (2022-10-31)

    Bug Fixes

    v1.5.19

    Compare Source

    @​niieani/scaffold 1.5.19 (2022-10-24)

    Bug Fixes
    • deps: update commitlint monorepo (94ec03b)

    v1.5.18

    Compare Source

    @​niieani/scaffold 1.5.18 (2022-10-17)

    Dependencies

    v1.5.17

    Compare Source

    @​niieani/scaffold 1.5.17 (2022-10-10)

    Bug Fixes

    v1.5.16

    Compare Source

    @​niieani/scaffold 1.5.16 (2022-10-03)

    Bug Fixes
    Dependencies

    v1.5.15

    Compare Source

    @​niieani/scaffold 1.5.15 (2022-08-15)

    Bug Fixes

    v1.5.14

    Compare Source

    @​niieani/scaffold 1.5.14 (2022-08-15)

    Bug Fixes
    • deps: update babel monorepo to ^7.18.10 (490f20b)

    Configuration

    📅 Schedule: Branch creation - "before 3am on Monday" (UTC), Automerge - At any time (no schedule defined).

    🚦 Automerge: Enabled.

    Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 1
Releases(2.2.10)
  • 2.2.10(Nov 20, 2021)

  • 2.2.9(Nov 7, 2021)

  • 2.2.8(Dec 18, 2020)

  • 2.2.7(Dec 18, 2020)

  • 2.2.6(Dec 18, 2020)

  • 2.2.5(Dec 18, 2020)

  • 2.2.4(Dec 18, 2020)

  • 2.2.3(Dec 13, 2020)

  • 2.2.2(Nov 7, 2020)

  • 2.2.1(Feb 4, 2020)

  • 2.2.0(Feb 3, 2020)

  • 2.1.0(Nov 9, 2019)

  • 2.0.1(Sep 6, 2019)

  • 2.0.0(Aug 31, 2019)

    2.0.0 (2019-08-31)

    BREAKING CHANGES

    • when used from Node (without ESM enabled), you now need to require('hashids/cjs')
    • constructor: we now expect salt and alphabet to be valid strings and minLength to be a valid number (if any are provided)
    • Hashids now throws errors when being constructed with incorrect options (previously, it silently fallbacked to defaults)

    Bug Fixes

    • extract BigInt test cases so they don't throw in unsupported envs (20f3df1)

    Code Refactoring

    • constructor: simplify constructor & extract 'shuffle' (85c7f49)

    Features

    • transparent support of BigInts. If your environment supports them, you can use the standard API to encode and decode them. Note that trying to decode a BigInt hashid on an unsupported environment will throw an error. Fixes #58. (df2c831)
    • lifted the limitation that the alphabet cannot contain spaces (df2c831)
    • both the alphabet and salt may now contain multi-byte characters (e.g. for an emoji-based alphabet) (526b6ca)
    • it is now possible to provide custom seps (e.g. to avoid custom curses). Fixes #17.

    Chores

    • upgraded all dependencies
    • tests now use jest testing framework
    • extracted static methods to helper functions
    • converted the implementation to TypeScript
    • added prettier
    • added stricter eslint rules
    • added semantic-release for automated releases
    Source code(tar.gz)
    Source code(zip)
  • 2.0.0-prerelease.4@next(Aug 17, 2019)

  • 2.0.0-prerelease.3@next(Aug 15, 2019)

  • 2.0.0-prerelease.1@next(Aug 15, 2019)

    2.0.0-prerelease.1 (2019-08-15)

    BREAKING CHANGES

    • when used from Node (without ESM enabled), you now need to require('hashids/cjs')
    • constructor: we now expect salt and alphabet to be valid strings and minLength to be a valid number (if any are provided)
    • Hashids now throws errors when being constructed with incorrect options (previously, it silently fallbacked to defaults)

    Bug Fixes

    • extract BigInt test cases so they don't throw in unsupported envs (20f3df1)

    Code Refactoring

    • constructor: simplify constructor & extract 'shuffle' (85c7f49)

    Features

    • transparent support of BigInts. If your environment supports them, you can use the standard API to encode and decode them. Note that trying to decode a BigInt hashid on an unsupported environment will throw an error. Fixes #58. (df2c831)
    • lifted the limitation that the alphabet cannot contain spaces (df2c831)
    • both the alphabet and salt may now contain multi-byte characters (e.g. for an emoji-based alphabet) (526b6ca)
    • it is now possible to provide custom seps (e.g. to avoid custom curses). Fixes #17.

    Chores

    • upgraded all dependencies
    • tests now use jest testing framework
    • extracted static methods to helper functions
    • converted the implementation to TypeScript
    • added prettier
    • added stricter eslint rules
    • added semantic-release for automated releases
    Source code(tar.gz)
    Source code(zip)
Owner
Bazyli Brzóska
An inventor passionate about HCI workflows that help humanity innovate responsibly, for happiness and global thriving. Official @zendesk account: @bbrzoska
Bazyli Brzóska
BHIMUPIJS is a npm module which can validate, verify and generate QR Codes for UPI IDs.

bhimupijs BHIMUPIJS is a npm module which can validate, verify and generate QR Codes for UPI IDs. Installation Install this npm package globally. npm

Emmadi Sumith Kumar 18 Nov 21, 2022
Makes downloading Scratch projects easy. Simply enter two project IDs and click start.

Makes downloading Scratch projects easy. Simply enter two project IDs and click start. No need to pick the right format or include the assets, all of this is done automatically and in the browser.

null 6 May 27, 2022
Small utilities for big decimal numbers.

dnum dnum (Decimal Numbers) is a library that allows to operate on large numbers represented as a pair composed of a BigInt for the value, and a Numbe

Pierre Bertet 45 Dec 21, 2022
A small javascript DOM manipulation library based on Jquery's syntax. Acts as a small utility library with the most common functions.

Quantdom JS Quantdom is a very small (about 600 bytes when ran through terser & gzipped) dom danipulation library that uuses a Jquery like syntax and

Sean McQuaid 7 Aug 16, 2022
This package will generate n numbers of thumbnails at different positions in a given video file.

The smallest library to generate video thumbnails on client side. About Generate n numbers of Image thumbnails of a video file. !Live Demo code sandbo

Rajesh Royal 32 Dec 20, 2022
Generate prime numbers from pictures!

Pictoprime This is a program used to generate prime numbers from pictures. Dependencies Ensure you have the following dependencies: Node.js (16+ suppo

Jesse Mitchell 276 Dec 27, 2022
no-comma is a javascript library for dealing with inputted numbers that include commas

no-comma no-comma is a javascript library for dealing with inputted numbers that include commas. Nocomma will allow you to check if the number contain

Fatty 3 Jan 27, 2022
An easy-to-use library to make your life easier when working with random numbers or random choices in javascript.

vrandom An easy-to-use library to make your life easier when working with random numbers or random choices in javascript. Table of contents Installati

Valerio Cipolla 1 Aug 16, 2022
front.phone is a Javascript library that identifies, validates and formats phone numbers.

front.phone front.phone is a Javascript library that identifies, validates and formats phone numbers. Demo The main goal of this project is to create

VTEX 55 Oct 27, 2022
An unreliable and overall unusable sorting library for numbers with a global cache on the edge.

unsort An unreliable and overall unusable sorting library for numbers with a global cache on the edge. the algorithm This library implements a number

Jonas Wanner 6 May 19, 2022
A jQuery-free general purpose library for building credit card forms, validating inputs and formatting numbers.

A jQuery-free general purpose library for building credit card forms, validating inputs and formatting numbers.

Jesse Pollak 528 Dec 30, 2022
A work-in-progress HTML sanitizer that strives for: performance like window.Sanitizer, readiness like DOMPurify, and ability to run in a WebWorker like neither of those.

Amuchina A work-in-progress HTML sanitizer that strives for: performance like window.Sanitizer, readiness like DOMPurify, and ability to run in a WebW

Fabio Spampinato 9 Sep 17, 2022
✏️ A small jQuery extension to turn a static HTML table into an editable one. For quickly populating a small table with JSON data, letting the user modify it with validation, and then getting JSON data back out.

jquery-editable-table A small jQuery extension to turn an HTML table editable for fast data entry and validation Demo ?? https://jsfiddle.net/torrobin

Tor 7 Jul 31, 2022
A JavaScript plugin for entering and validating international telephone numbers

International Telephone Input A JavaScript plugin for entering and validating international telephone numbers. It adds a flag dropdown to any input, d

Jack O'Connor 6.6k Dec 30, 2022
This project is used to extract media from various posting platfroms like Twitter, Reddit, Pixiv, Youtube and many other

Social-Picker-API This project is used to extract media from various posting platfroms like Twitter, Reddit, Pixiv, Youtube and many others. It's writ

Serge 11 Nov 29, 2022
Code in Solidity like a PRO with Egor Gavrilov. Check out YouTube channel ▶️

Code in Solidity like a PRO with Egor Gavrilov Check out YouTube channel youtube.com/EgorGavrilov Tutorials Perfect Solidity Stack It's easy to get st

Egor Gavrilov 53 Dec 19, 2022
Cross-browser plugin to remove addictive features on YouTube like thumbnails, comments, previews and more...

ZenTube Installation Features Remove some (more) elements from Youtube to make it less addictive. Mix and match between the following options: Hide or

inversepolarity 57 Dec 17, 2022
A CodeMirror (v6) extension for adding relative line numbers to your code editor

Relative Line Numbers for CM6 Installation yarn add codemirror-line-numbers-relative Usage import { EditorView } from "@codemirror/view"; import { Edi

Joe Previte 5 Feb 7, 2022
Kyrgyz / Kazakh numbers-to-words converter

Kyrgyz / Kazakh numbers-to-words converter

Timur 4 Mar 12, 2022