+0
-0
@@ -0,0 +0,0 @@ 'use strict'; |
+1
-3
| { | ||
| "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", |
+4
-1
@@ -8,3 +8,3 @@ ## Is-User | ||
| [](http://opensource.org/licenses/MIT) | ||
| [](https://github.com/xojs/xo) | ||
| [](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
1.6%5
-28.57%24
14.29%