Gatekeeper's generic utils - shared in NPM
npm install @gatekeeper_technology/utilsGatekeeper's generic utilities package, designed to provide reusable utility functions for various common operations. This package is shared via NPM and can be used across multiple projects.
- Date and Time Utilities: Functions for handling and formatting dates and times.
- General Utilities: Common utility functions such as sorting arrays, formatting text, and more.
Install the package via Yarn:
``bash`
yarn add @gatekeeper-technology/utils`Usage
Import the utilities you need:
import { getDisplayValue, formatText, sortArrayByField } from "@gatekeeper-technology/utils";
// Example usage
const formattedText = formatText(" This is a Text ");
console.log(formattedText); // Output: "this_is_a_text"
`
yarn build
`
Running Tests
This project uses Jest for testing. To run the tests, execute:
`
yarn test
``Directory Structure
- src/: Contains the source code for the utilities.
- test/: Contains unit tests for the utilities.
- coverage/: Contains code coverage reports.