A collection of useful Node utility functions that can be used across projects. Written in TypeScript.
Install through npm:
npm install @egjiri/node-kit
Install through yarn:
yarn add @egjiri/node-kit
import { formatNumber } from '@egjiri/node-kit/numbers'
formatNumber(1234.56, 'currency');
// => $1,234.56
import { removeKeysWithBlankValues } from '@egjiri/node-kit/objects'
removeKeysWithBlankValues({
first: 'first',
second: null,
third: undefined,
fourth: 4
});
// => { first: 'first', fourth: 4 }
- Install dependencies:
yarn
- Run tests
yarn test
(tests automatically re-run when TypeScript src files change) - Start Coding!
This project is released through GitHub Actions workflows that:
- Run the test suite and linters
- Build the TypeScript codebase into a build folder with JavaScript and TypeScript type definition files.
- Publish the build folder to the NPM Registry.