
Security News
Oxlint Introduces Type-Aware Linting Preview
Oxlint’s new preview brings type-aware linting powered by typescript-go, combining advanced TypeScript rules with native-speed performance.
string-lib-1
Advanced tools
A simple JavaScript library to manipulate strings.
Use the package manager npm to install.
npm i string-lib-1
const stringLib = require("string-lib-1");
stringLib.capitalize('hello world');
// returns "Hello world"
stringLib.allCaps('foo bar');
// returns "FOO BAR"
stringLib.capitalizeWords('hello world');
// returns "Hello World"
stringLib.removeExtraSpaces(" Hello world! buttons ");
// returns "hello world! buttons"
stringLib.kebobCase(" Hello world! buttons ");
// returns "hello-world-buttons"
stringLib.snakeCase(" Hello world! buttons ");
// returns "hello_world_buttons"
stringLib.camelCase(" Hello world! buttons ");
// returns "helloWorldButtons"
stringLib.shift("Hello world!");
// returns "ello world!H"
stringLib.makeHashTag("Amazing bongo drums for sale", 3);
// returns an array of the n longest words of a given string, with a hashtag '#' prepended to them
// returns ['#amazing', '#bongo', '#drums']
stringLib.isEmpty(` `);
// returns true
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
To run tests:
npm test
To check code test coverage:
npx jest --coverage
FAQs
A simple JavaScript library to manipulate strings
The npm package string-lib-1 receives a total of 0 weekly downloads. As such, string-lib-1 popularity was classified as not popular.
We found that string-lib-1 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oxlint’s new preview brings type-aware linting powered by typescript-go, combining advanced TypeScript rules with native-speed performance.
Security News
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.