cusip-generator is a Node.js library to generate random CUSIP with a single API.
CUSIP stands for Committee on Uniform Securities Identification Procedures. A CUSIP number identifies most financial instruments, including: stocks of all registered U.S. and Canadian companies, commercial paper, and U.S. government and municipal bonds.
npm i @thomaschaplin/cusip-generator
const generateCusip = require("@thomaschaplin/cusip-generator");
console.log(generateCusip.generateCusip()); // 327492T38or
const { generateCusip } = require("@thomaschaplin/cusip-generator");
console.log(generateCusip()); // 5519069J1import { generateCusip } from '@thomaschaplin/cusip-generator')
console.log(generateCusip()) // 112091HZ9Make sure you have Node.js installed on your machine
- Clone this repository
git clone git@github.com:thomaschaplin/cusip-generator.git - Change directory
cd cusip-generator - Install the dependencies
npm install - Transpile the code
npm run buildornpm run watch
- Run the tests
npm test - Run the tests with coverage
npm run test:coverage
Logo graphic by Perlenfuerdiehunde from ClipArtKey.
