Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/muhammadabir64/constantor-js
A collection of string constants for JavaScript
https://github.com/muhammadabir64/constantor-js
constantor javascript string-constant string-manipulation
Last synced: 28 days ago
JSON representation
A collection of string constants for JavaScript
- Host: GitHub
- URL: https://github.com/muhammadabir64/constantor-js
- Owner: muhammadabir64
- License: mit
- Created: 2022-01-16T06:49:32.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-01-18T08:09:12.000Z (almost 3 years ago)
- Last Synced: 2023-06-30T03:36:35.613Z (over 1 year ago)
- Topics: constantor, javascript, string-constant, string-manipulation
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/constantor-js
- Size: 23.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# constantor-js
### A collection of string constants for JavaScript
A constant is used to define a fixed value in a variable that cannot be modified anywhere in the code following declaration. This JavaScript module contains some string constants that can be used for various purposes like generate random string for passwords, tokens etc...| Constant | Value |
| ------ | ------ |
| ascii_lowercase | abcdefghijklmnopqrstuvwxyz |
| ascii_uppercase | ABCDEFGHIJKLMNOPQRSTUVWXYZ |
| ascii_letters | ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz |
| digits | 0123456789 |
| hexdigits | 0123456789abcdefABCDEF |
| octdigits | 01234567 |
| punctuation | !#$%&`'\"(){}[]*+,-_~./\\:;<>=?@^\| |
| whitespace | \t\n\r\v\f |
| printable | includes the values of digits, ascii_letters, punctuation & whitespace |## usage
```sh
npm i constantor-js
```
```sh
const constantor = require("constantor-js");
console.log(constantor.ascii_lowercase);
```
**output**
```sh
abcdefghijklmnopqrstuvwxyz
```
\
[This module was heavily inspired by python string/lib](https://docs.python.org/3/library/string.html)