github-oauth-scopes

0.1.0 • Public • Published

github-oauth-scopes

utility for processing github oath scopes

Build Status Coverage Status

var ghScopes = require('github-oath-scopes');

ghScopes.isValid('repo'); // true
ghScopes.isValid('bad_scope'); // false

ghScopes.validate(['repo','bad_scope']); // throws an error
ghScopes.validate(['repo']);             // returns the array
ghScopes.validate(null | undefined);     // returns an empty array

// eliminate redundant scopes
ghScopes.reduce(['repo', 'repo:status']); // returns ['repo'];

ghScopes.longDescriptions; // a map of scopes to detailed descriptions
ghScopes.shortDescriptions; // a map of scopes to tool-tip ready descriptions

Readme

Keywords

Package Sidebar

Install

npm i github-oauth-scopes

Weekly Downloads

0

Version

0.1.0

License

MIT

Last publish

Collaborators

  • jamestalmage