scope-test

1.1.1 • Public • Published

scope-test

NPM version

Simple util to test collections of granted scope against required one.

Features

  • Isomorphic module
  • Error with missing scopes
  • Case insensitive option
  • Flowtype definition

Installation

NPM

$ npm install scope-test

Usage

import { scopeTest } from 'scope-test';
 
try {
 scopeTest([ 'email' ], {
   requiredScopes: [ 'email', 'profile' ],
   ignoreCase: true
 }); 
} catch (err) {
  console.log(err.missingScopes);
}

Licences

Scope-test is licensed under the MIT License.

Readme

Keywords

Package Sidebar

Install

npm i scope-test

Weekly Downloads

1

Version

1.1.1

License

MIT

Last publish

Collaborators

  • njakob