https://github.com/node-oauth/formats
Validate unicode values
https://github.com/node-oauth/formats
Last synced: 5 months ago
JSON representation
Validate unicode values
- Host: GitHub
- URL: https://github.com/node-oauth/formats
- Owner: node-oauth
- License: mit
- Created: 2021-11-21T11:42:44.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-12-11T16:02:32.000Z (about 4 years ago)
- Last Synced: 2025-06-27T09:16:15.589Z (6 months ago)
- Language: JavaScript
- Size: 74.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @node-oauth/formats
Minimal, [RFC 6749](https://datatracker.ietf.org/doc/html/rfc6749#appendix-A)
compliant ascii and unicode validator.
This package is intended to be used with a OAuth2 server, like
[@node-oauth/node-oauth2-server](https://github.com/node-oauth/node-oauth2-server)
, but can also be used with any other project, that shares the same
requirements.
## Install
```bash
$ npm install @node-oauth/formats
```
## Usage
```js
const isFormat = require('@node-oauth/formats')
isFormat.nchar('Hello, World!') // false
isFormat.nqchar('Hello, World!') // true
```
For detailed usage see the [API docs](./API.md)
## Test
```sh
npm install
npm run lint # run esline in check mode
npm run lint:fix # run esline in check mode
npm run test # run test once
npm run test:coverage # run tests with coverage report
```
## License
This project has been outsourced from
[@node-oauth/node-oauth2-server](https://github.com/node-oauth/node-oauth2-server)
, which is a fork from [oauth2-server](https://github.com/oauthjs/node-oauth2-server)
. The licence remains MIT, see [our license file](./LICENSE).