1.1.1 • Published 8 years ago

scope-test v1.1.1

Weekly downloads
4
License
MIT
Repository
github
Last release
8 years ago

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.

1.1.1

8 years ago

1.1.0

8 years ago

1.0.0

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago