limitedstring-ts
v1.0.0
Published
A TypeScript library to create and manipulate strings with size limitations
Downloads
92
Readme
limitedstring-ts
A TypeScript library to create and manipulate strings with size limitations.
Installation
You can install limitedstring-ts
using npm:
npm install limitedstring-ts
Or using yarn:
yarn add limitedstring-ts
Usage
Import the library and use it in your TypeScript or JavaScript project:
import { LimitedString } from "limitedstring-ts";
const myString = new LimitedString("Hello, World!", 10); // throws error
const otherString = new LimitedString("Hello", 10); // this is okay
Features
- Create strings with a specified maximum length.
- An error is thrown at construction time if the string is not valid.
Documentation
For detailed documentation, please visit the GitHub repository.
Development
Building the Project
To build the project, run:
npm run build
Running Tests
This project uses Jest for testing. To run tests, use:
npm test
Linting
Lint your code using ESLint:
npm run lint
Contributing
Contributions are welcome! Please open an issue or submit a pull request to help improve this library.
License
This project is licensed under the MIT License. See the LICENSE file for details.