@travi/any
Advanced tools
Comparing version 3.0.2 to 3.1.0
@@ -29,2 +29,16 @@ 'use strict'; | ||
} | ||
function _toPrimitive(t, r) { | ||
if ("object" != typeof t || !t) return t; | ||
var e = t[Symbol.toPrimitive]; | ||
if (void 0 !== e) { | ||
var i = e.call(t, r || "default"); | ||
if ("object" != typeof i) return i; | ||
throw new TypeError("@@toPrimitive must return a primitive value."); | ||
} | ||
return ("string" === r ? String : Number)(t); | ||
} | ||
function _toPropertyKey(t) { | ||
var i = _toPrimitive(t, "string"); | ||
return "symbol" == typeof i ? i : String(i); | ||
} | ||
function _defineProperty(obj, key, value) { | ||
@@ -44,16 +58,2 @@ key = _toPropertyKey(key); | ||
} | ||
function _toPrimitive(input, hint) { | ||
if (typeof input !== "object" || input === null) return input; | ||
var prim = input[Symbol.toPrimitive]; | ||
if (prim !== undefined) { | ||
var res = prim.call(input, hint || "default"); | ||
if (typeof res !== "object") return res; | ||
throw new TypeError("@@toPrimitive must return a primitive value."); | ||
} | ||
return (hint === "string" ? String : Number)(input); | ||
} | ||
function _toPropertyKey(arg) { | ||
var key = _toPrimitive(arg, "string"); | ||
return typeof key === "symbol" ? key : String(key); | ||
} | ||
@@ -77,5 +77,5 @@ const debug = debugLibrary('any'); | ||
const email = options => chance.email(!isPrimitive(options) ? options : undefined); | ||
const date = () => chance.date({ | ||
const date = options => chance.date(_objectSpread2({ | ||
string: true | ||
}); | ||
}, options)); | ||
const fromList = list => chance.pickone(list); | ||
@@ -82,0 +82,0 @@ const subList = (list, { |
@@ -5,3 +5,3 @@ { | ||
"license": "MIT", | ||
"version": "3.0.2", | ||
"version": "3.1.0", | ||
"engines": { | ||
@@ -100,11 +100,11 @@ "node": "^18.17 || >=20.6.1" | ||
"devDependencies": { | ||
"@babel/plugin-transform-exponentiation-operator": "7.22.5", | ||
"@babel/register": "7.22.15", | ||
"@babel/plugin-transform-exponentiation-operator": "7.23.3", | ||
"@babel/register": "7.23.7", | ||
"@rollup/plugin-babel": "6.0.4", | ||
"@travi/babel-preset": "3.0.113", | ||
"@travi/eslint-config": "5.0.3", | ||
"@travi/babel-preset": "3.0.119", | ||
"@travi/eslint-config": "5.0.7", | ||
"@travi/eslint-config-mocha": "1.0.21", | ||
"c8": "8.0.1", | ||
"chai": "4.3.10", | ||
"commitlint-config-travi": "1.4.40", | ||
"c8": "9.1.0", | ||
"chai": "4.4.1", | ||
"commitlint-config-travi": "1.4.47", | ||
"coveralls": "3.1.1", | ||
@@ -115,8 +115,8 @@ "cross-env": "7.0.3", | ||
"globstar": "1.0.0", | ||
"husky": "8.0.3", | ||
"ls-engines": "0.9.0", | ||
"husky": "9.0.10", | ||
"ls-engines": "0.9.1", | ||
"mocha": "10.2.0", | ||
"npm-run-all2": "6.1.1", | ||
"npm-run-all2": "6.1.2", | ||
"proxyquire": "2.1.3", | ||
"publint": "0.2.5", | ||
"publint": "0.2.7", | ||
"referee": "1.2.0", | ||
@@ -128,7 +128,7 @@ "referee-sinon": "1.0.3", | ||
"rimraf": "5.0.5", | ||
"rollup": "4.3.0", | ||
"rollup": "4.9.6", | ||
"rollup-plugin-auto-external": "2.0.0", | ||
"sinon": "17.0.1", | ||
"tsd": "0.29.0" | ||
"tsd": "0.30.4" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
35991