@carry0987/utils v3.2.18
Utils-JS
A library for using common tools and alias methods
Installation
npm install @carry0987/utils -D
Usage
Importing Entire Modules
You can import the entire set of utilities if you prefer, like this:
import { storageUtils } from '@carry0987/utils';
// Usage
storageUtils.setLocalValue('key', 'value');
const value = storageUtils.getLocalValue('key');
Importing Specific Functions (Tree Shaking)
To help with optimizing your bundle size, you can import only the functions you need from @carry0987/utils
. This helps to reduce the size of your final bundle because unused code will not be included if your bundler supports tree shaking.
// Import specific utilities
import { setLocalValue, getLocalValue, removeLocalValue } from '@carry0987/utils';
// Usage
setLocalValue('key', 'value');
const value = getLocalValue('key');
removeLocalValue('key');
By using specific imports, you can take advantage of tree shaking in bundlers like Webpack or Rollup, which can statically analyze the imports and remove unused code.
1 month ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago