@mohamedbechirmejri/js-ext
v0.0.17
Published
> A collection of useful JavaScript functions
Readme
js-ext
A collection of useful JavaScript functions
instead of having to create helper functions for every project, I decided to create a library of useful functions that I can use in any project. bard recommended i use lodash or a similar library, but i wanted to create my own library for fun. and utilize javascript's prototype system to avoid having to import functions from a library.
Install
bun i @mohamedbechirmejri/js-extFeatures
Typescript support
add the following to your tsconfig.json file
{
"compilerOptions": {
"types": ["./node_modules/@mohamedbechirmejri/js-ext/.build/index.d.ts"]
}
}Usage
// main.js
import init from "@mohamedbechirmejri/js-ext";
init();you can supply a config object to the init function to turnoff some functions
init({ ignore: ["CAPITALIZE"] });"test".CAPITALIZE(); // TestFunctions
you can use your IDE's intellisense to see all the functions
the library also includes JSDOC comments for all the functions
String
"test".CAPITALIZE(); // Test
"test".REVERSE(); // tset