This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

chmod-style-permissions

1.0.0 • Public • Published

chmod-style-permissions

A node module to make user permissions simple

Installation

Using NPM, type:

npm install --save chmod-style-permissions

to install. This package is not yet available for the browser.

Then, add to the top of your code:

var csp = require("chmod-style-permissions")

Usage

The main function, csp.hasPerm(), takes 2 arguments; an array of a user's permissions, and a node to check against.

Examples:

csp.hasPerm([
  "bot.kick",
  "bot.ban",
  "bot.nicknames.*"
], "bot.nicknames.change")
// → true

csp.hasPerm([
  "bot.kick",
  "bot.ban",
  "bot.nicknames.*"
], "bot.restart")
// → false

Author & license

This was written by Jay Williams. You are granted permission to use this in your code as /LICENSE states. If you fork this and edit it, a pull request would be greatly appreciated!

Versions

Current Tags

VersionDownloads (Last 7 Days)Published

Version History

VersionDownloads (Last 7 Days)Published

Package Sidebar

Install

npm i chmod-style-permissions

Weekly Downloads

0

Version

1.0.0

License

MIT

Last publish

Collaborators

  • codingjwilliams