Skip to content

njakob/scope-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Simple util to test collections of granted scope against required one

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published