Comparing version 1.0.0 to 1.1.0
'use strict'; | ||
const userArr = ['user', 'admin', 'manager', 'superadmin', 'ceo']; | ||
const is = input => { | ||
const is = (userArr, input) => { | ||
const inputLowerCase = input.toLowerCase(); | ||
return userArr.includes(inputLowerCase); | ||
const userArrLowerCase = userArr.map( item => item.toLowerCase()); | ||
return userArrLowerCase.includes(inputLowerCase); | ||
}; | ||
@@ -7,0 +9,0 @@ module.exports = { |
{ | ||
"name": "is-user", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -9,4 +9,5 @@ ## Is-User | ||
const isUser = require('is-user'); | ||
let isAdmin = isUser.is('admin'); //true | ||
let isManager = isUser.is('manager'); //true | ||
const userArr = ['user', 'admin', 'manager', 'superadmin', 'ceo']; | ||
let isAdmin = isUser.is(userArr, 'admin'); //true | ||
let isManager = isUser.is(userArr, 'manager'); //true | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2643
12