auth-permission

Represent a permission having an action and resource.

npm install auth-permission
3 downloads in the last day
5 downloads in the last week
11 downloads in the last month

auth-permission

Represent a permission having an action and resource.

Installation

Node

npm install auth-permission

Browser

component install alexmingoia/auth-permission

Example

var Permission = require('auth-permission');

var permission = new Permission('read', 'forum');

API

Permission(action, resource)

Creates a new Permission with given action and resource.

permission.name()

var permission = new Permission('read', 'forum');

permission.name();
// => "read forum"

permission.action()

permission.resource()

MIT Licensed

npm loves you