strdash
v0.2.0
Published
An open-source JavaScript library for formatting and manipulating strings.
Downloads
4
Maintainers
Readme
strdash.js
strdash.js is an open-source JavaScript library for formatting and manipulating strings.
🔧 Install
strdash.js is available on npm. It can be installed with the following command:
npm install strdash --save
strdash is available on yarn as well. It can be installed with the following command:
yarn add strdash --save
If you don't want to use npm or yarn, strdash.min.js can be downloaded to your project source.
📖 Documentation
🎀 isEmpty()
// Node.js
const str = require("strdash");
console.log(str('').isEmpty());
// expected output: true
🎀 isNumeric()
console.log(str('123').isNumeric());
// expected output: true
🎀 isAlpha()
console.log(str('abc').isAlpha());
// expected output: true
🎀 isAlphaNumeric()
console.log(str('abc123').isAlphaNumeric());
// expected output: true
🎀 isLowerCase()
console.log(str('abc').isLowerCase());
// expected output: true
🎀 isUpperCase()
console.log(str('ABC').isUpperCase());
// expected output: true
🎀 toBoolean()
console.log(str('true').toBoolean());
// expected output: true
console.log(str('yes').toBoolean());
// expected output: true
console.log(str('on').toBoolean());
// expected output: true
console.log(str('1').toBoolean());
// expected output: true
🎀 toInt()
console.log(str('99').toInt());
// expected output: 99
🎀 toFloat()
console.log(str('99').toFloat(2));
// expected output: 99
🎀 toString()
console.log(str(99).toString());
// expected output: "99"
📜 Changelog
Latest version 0.2.0 (2021-09-14):
- toBoolean()
- toInt()
- toFloat()
- toString()
Details changes for each release are documented in the CHANGELOG.md.
❗ Issues
If you think any of the strdash.js
can be improved, please do open a PR with any updates and submit any issues. Also, I will continue to improve this, so you might want to watch/star this repository to revisit.
💪 Contribution
We'd love to have your helping hand on contributions to strdash.js
by forking and sending a pull request!
Your contributions are heartily ♡ welcome, recognized and appreciated. (✿◠‿◠)
How to contribute:
- Open pull request with improvements
- Discuss ideas in issues
- Spread the word
- Reach out with any feedback