Simple util to test collections of granted scope against required one.
- Isomorphic module
- Error with missing scopes
- Case insensitive option
- Flowtype definition
$ npm install scope-test
import { scopeTest } from 'scope-test';
try {
scopeTest([ 'email' ], {
requiredScopes: [ 'email', 'profile' ],
ignoreCase: true
});
} catch (err) {
console.log(err.missingScopes);
}
Scope-test is licensed under the MIT License.