Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/klipitkas/stripe-nanoid
A tiny, secure, unique ID generator for IDs that look similar to Stripe's.
https://github.com/klipitkas/stripe-nanoid
id module nanoid nodejs npm npm-package stripe stripe-id stripe-nanoid tiny uid
Last synced: 2 months ago
JSON representation
A tiny, secure, unique ID generator for IDs that look similar to Stripe's.
- Host: GitHub
- URL: https://github.com/klipitkas/stripe-nanoid
- Owner: klipitkas
- License: unlicense
- Created: 2020-08-30T21:15:48.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-12-30T21:30:40.000Z (about 2 years ago)
- Last Synced: 2024-11-03T02:37:47.338Z (3 months ago)
- Topics: id, module, nanoid, nodejs, npm, npm-package, stripe, stripe-id, stripe-nanoid, tiny, uid
- Language: JavaScript
- Homepage:
- Size: 117 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Stripe NanoID
A tiny, secure, unique ID generator for IDs that look similar to Stripe's.
### INSTALL
To install the package:
```bash
$ npm install --save stripe-nanoid
```### RUN TESTS
```bash
$ npm run test
```### USAGE
A usage example is below:
```js
const stripenanoid = require('stripe-nanoid');
``````js
stripenanoid('cus'); //=> "cus_rPaZmctZlfLGHdZHiljZY"
```### OPTIONS
A usage example with options is below:
```js
const options = {
alphabet: 'abcDEF',
size: 4,
};
```Then you can use them:
```js
stripenanoid('cus', options)); //=> "cus_cFEa"
```