Comparing version 1.3.0 to 1.4.0
@@ -0,0 +0,0 @@ 'use strict'; |
{ | ||
"name": "is-user", | ||
"version": "1.3.0", | ||
"version": "1.4.0", | ||
"description": "", | ||
@@ -28,4 +28,2 @@ "license": "MIT", | ||
"devDependencies": { | ||
"babel-cli": "^6.26.0", | ||
"babel-preset-es2015": "^6.24.1", | ||
"chai": "^4.1.2", | ||
@@ -32,0 +30,0 @@ "ghooks": "^2.0.2", |
@@ -8,3 +8,3 @@ ## Is-User | ||
[![MIT License](https://img.shields.io/npm/l/is-user.svg?style=flat-square)](http://opensource.org/licenses/MIT) | ||
[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/xojs/xo) | ||
[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg?style=flat-square)](https://github.com/xojs/xo) | ||
@@ -16,5 +16,8 @@ #How to use | ||
export.update = function(req, res){ | ||
//chaching the roles for future use in this function" | ||
const userArr = ['user', 'admin', 'manager', 'superadmin', 'ceo']; | ||
isUser.cache(userArr); | ||
let isAdmin = isUser.is('admin'); //true | ||
@@ -21,0 +24,0 @@ let isManager = isUser.is('manager'); //true |
Sorry, the diff of this file is not supported yet
3497
5
24