constrainjs
v1.0.5
Published
A schema definition package for configuration JSON files and objects
Downloads
5
Maintainers
Readme
WARNING Major updates are being made to this package without a version change as this package is not made for public release yet
See our docs for full documentation
Table of Contents
- Table of Contents
- Quick Start Guide
- What's included
- Compatibility
- Bugs and feature requests
- Contributing
- Authors
- Copyright and license
Quick Start Guide
Require the package
const constrainjs = require("constrainjs");
// or
const {ConstrainArray, ConstrainString} = require("constrainjs").native;
and start using the new native objects!
const myArray = ["hello", "world"];
const options = {
maxLength: 5,
allowedTypes: ["string"]
}
const myBetterArray = new ConstrainArray(myArray, options)
See our docs for further documentation
What's included
- Native
- Array (A custom and constrainable version of the native Array object)
- String (A custom and constrainable version of the native String object)
- JSON
- Config (A JSON object access class, used by Schema for defining controlled schemas)
- ConfigSchema (A Class used to define schemas and check objects against them)
Compatibility
Bugs and feature requests
Have a bug or a feature request? Please first read the issue guidelines and search for existing and closed issues. If your problem or idea is not addressed yet, please open a new issue.
Contributing
Please read through our contributing guidelines. Included are directions for opening issues, coding standards, and notes on development.
VSCode Editor preferences are left available in the editor config to aid development, any changes made to this folder for personal preferences should NOT be committed to any PRs
Authors
Inanis
Main developer and package initiator
If you would like to join this list, please feel free to send a pull request!
Copyright and license
Code released under the MIT License.
Enjoy