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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.0
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.0
    1

Package Sidebar

Install

npm i github-oauth-scopes

Weekly Downloads

1

Version

0.1.0

License

MIT

Last publish

Collaborators

  • jamestalmage