@jtmdias/js-utilities
v1.6.3
Published
A collection of javascript utilities for web projects
Downloads
11
Readme
The problem
I do a bunch of open source and want to make it easier to share utilities between multiple projects.
This solution
This is a collection of javascript functions, utilities and react hooks that are available on npm.
Table of Contents
- The problem
- This solution
- Table of Contents
- Installation
- Usage
- Functions
- React Hooks
- Utils
- Tests
- Other Solutions
- Issues
- Contributors ✨
- LICENSE
Installation
This module is distributed via npm which is bundled with node and
should be installed as one of your project's dependencies
:
npm install --save-dev @jtmdias/js-utilities
Usage
This is a collection of functions, utilities and react hooks. You'll find all available code in src
.
The bundle is available as:
- ES Modules
- UMD (Universal Module Definition)
To import a piece of code into your javascript project just do:
import { callIfExists, throwError, getLSItem, useConstant } from "@jtmdias/js-utilities";
Functions
WIP
React Hooks
WIP
Utils
WIP
Tests
All tests have been written using cypress. To run tests locally:
# using npm
npm run test:open
# using npm (headless)
npm run test
# using yarn
yarn test:open
# using yarn (headless)
yarn test
Other Solutions
If you are aware of any please make a pull request and add it here! Again, this is a very specific-to-me solution.
- Lightdash - A small JavaScript utility library to complement lodash.
- You might not need lodash - It’s a great library, well crafted, battle tested and with a very skilled and active community contributing. The goal of this project is NOT to provide drop in replacements, but to show how to achieve similar functionalities in plain Javascript, to understand how things work behind the hood.
Issues
Looking to contribute? Look for the Good First Issue label.
🐛 Bugs
Please file an issue for bugs, missing documentation, or unexpected behavior.
💡 Feature Requests
Please file an issue to suggest new features. Vote on feature requests by adding a 👍. This helps maintainers prioritize what to work on.
Contributors ✨
This project follows the all-contributors specification. Contributions of any kind welcome!
LICENSE
MIT