Nemo's Parental Misguidance

    permission-check

    1.0.1 • Public • Published

    permission-check

    Start

    npm install permission-check

    Base

    Based on the express-jwt, use token message in express-jwt.

    Usage

    const pcheck = require("permission-check");

    pcheck(object, name)

    • object:

      Permission Object. Default: {}

      {
          // key:[values]
          '/role':[/* permission string */]
      }
    • name:

      Name in the jwt token. Default: 'permission'

      // eg: jwt token
      {
          gender: 0,
          age: 32,
          permission: [...],
          ...
      }
      // name = permission

    Install

    npm i permission-check

    DownloadsWeekly Downloads

    2

    Version

    1.0.1

    License

    ISC

    Unpacked Size

    1.64 kB

    Total Files

    3

    Last publish

    Collaborators

    • unkown-y