@mashroom/mashroom-utils
Advanced tools
Comparing version 1.6.4 to 1.7.0
@@ -18,3 +18,3 @@ "use strict"; | ||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } | ||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } | ||
@@ -78,3 +78,3 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } | ||
return context[arg]; | ||
}); // $FlowFixMe | ||
}); | ||
@@ -81,0 +81,0 @@ var template = _construct(Function, _toConsumableArray(args).concat(["return `".concat(templateStr, "`;")])); |
@@ -14,3 +14,5 @@ "use strict"; | ||
// @ts-ignore | ||
var getClientIP = function getClientIP(request) { | ||
// @ts-ignore | ||
return _requestIp.default.getClientIp(request); | ||
@@ -17,0 +19,0 @@ }; |
@@ -8,3 +8,2 @@ "use strict"; | ||
/* eslint no-console: off */ | ||
var dummyLoggerFactory = function dummyLoggerFactory() { | ||
@@ -16,3 +15,5 @@ var dummyLogger = { | ||
error: console.error, | ||
addContext: function addContext() {}, | ||
addContext: function addContext() { | ||
/* nothing to do */ | ||
}, | ||
withContext: function withContext() { | ||
@@ -19,0 +20,0 @@ return dummyLogger; |
@@ -69,3 +69,3 @@ "use strict"; | ||
for (var key in sourceObj) { | ||
if (sourceObj.hasOwnProperty(key)) { | ||
if (Object.prototype.hasOwnProperty.call(sourceObj, key)) { | ||
if (isObject(sourceObj[key])) { | ||
@@ -72,0 +72,0 @@ if (!targetObj[key]) { |
@@ -24,3 +24,3 @@ "use strict"; | ||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } | ||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } | ||
@@ -27,0 +27,0 @@ function _isNativeFunction(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1; } |
@@ -24,3 +24,3 @@ "use strict"; | ||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } | ||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } | ||
@@ -27,0 +27,0 @@ function _isNativeFunction(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1; } |
@@ -43,3 +43,4 @@ "use strict"; | ||
exports.cloneAndFreezeArray = cloneAndFreezeArray; | ||
var createReadonlyProxy = createReadonlyProxyImpl; | ||
var createReadonlyProxy = createReadonlyProxyImpl; // eslint-disable-next-line @typescript-eslint/ban-types | ||
exports.createReadonlyProxy = createReadonlyProxy; | ||
@@ -51,6 +52,7 @@ | ||
if (!(name in target)) { | ||
if (logger) logger.warn("Attempt to access non existent property: ".concat(name)); | ||
if (logger) logger.warn("Attempt to access non existent property: ".concat(String(name))); | ||
return undefined; | ||
} | ||
} // @ts-ignore | ||
var val = target[name]; | ||
@@ -69,5 +71,5 @@ | ||
set: function set(target, name) { | ||
throw new _ReadOnlyError.default("Attempt to set property on read-only object: ".concat(name)); | ||
throw new _ReadOnlyError.default("Attempt to set property on read-only object: ".concat(String(name))); | ||
} | ||
}); | ||
} |
@@ -24,3 +24,3 @@ "use strict"; | ||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } | ||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } | ||
@@ -27,0 +27,0 @@ function _isNativeFunction(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1; } |
@@ -13,2 +13,3 @@ "use strict"; | ||
var determineUserAgent = function determineUserAgent(req) { | ||
// @ts-ignore | ||
var ua = (0, _uaParserJs.default)(req.headers['user-agent']); | ||
@@ -15,0 +16,0 @@ return { |
@@ -7,3 +7,3 @@ { | ||
"license": "MIT", | ||
"version": "1.6.4", | ||
"version": "1.7.0", | ||
"main": "lib", | ||
@@ -18,9 +18,15 @@ "files": [ | ||
"request-ip": "^2.1.3", | ||
"ua-parser-js": "^0.7.23" | ||
"ua-parser-js": "^0.7.24" | ||
}, | ||
"devDependencies": { | ||
"@babel/cli": "^7.12.1", | ||
"eslint": "^7.13.0", | ||
"flow-copy-source": "^2.0.9", | ||
"jest": "^26.6.3" | ||
"@babel/cli": "^7.12.16", | ||
"@types/express": "^4.17.11", | ||
"@types/jest": "^26.0.20", | ||
"@types/request-ip": "^0.0.35", | ||
"@types/ua-parser-js": "^0.7.35", | ||
"cpy-cli": "^3.1.1", | ||
"del-cli": "^3.0.1", | ||
"eslint": "^7.20.0", | ||
"jest": "^26.6.3", | ||
"typescript": "^4.1.5" | ||
}, | ||
@@ -33,9 +39,11 @@ "jest": { | ||
], | ||
"testRegex": "(\\.(test|spec))\\.js$" | ||
"testRegex": "(\\.(test|spec))\\.ts" | ||
}, | ||
"scripts": { | ||
"lint": "eslint src test --fix", | ||
"lint": "eslint src test --ext \".ts\" --fix", | ||
"type-check": "tsc --noEmit", | ||
"type-gen": "tsc --emitDeclarationOnly --declaration && cpy --parents --cwd=lib/declarations/src '**/*.d.ts' '../../../lib' && del-cli lib/declarations", | ||
"test": "jest", | ||
"build": "babel src -d lib && flow-copy-source src lib" | ||
"build": "babel src -d lib --extensions \".ts\" && npm run type-gen" | ||
} | ||
} |
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
568
40489
10
Updatedua-parser-js@^0.7.24