@corefunc/corefunc
Advanced tools
Comparing version 0.0.39 to 0.0.40
@@ -18,6 +18,3 @@ /** | ||
} | ||
const affirmative = value | ||
.toString() | ||
.toLocaleLowerCase() | ||
.trim(); | ||
const affirmative = value.toString().toLocaleLowerCase().trim(); | ||
if (affirmative.length === 0) { | ||
@@ -24,0 +21,0 @@ return onEmpty; |
@@ -13,3 +13,3 @@ function isHashObject(value) { | ||
const obj = Object.assign({}, sourceObject); | ||
Object.keys(destinationObject).forEach(function(key) { | ||
Object.keys(destinationObject).forEach(function (key) { | ||
if (key === "__proto__" || key === "constructor") { | ||
@@ -16,0 +16,0 @@ return; |
export default function objectType(value) { | ||
const type = Object.prototype.toString | ||
.call(value) | ||
.toLowerCase() | ||
.split("[object ") | ||
.pop() | ||
.split("]") | ||
.shift(); | ||
const type = Object.prototype.toString.call(value).toLowerCase().split("[object ").pop().split("]").shift(); | ||
if (["global", "window"].includes(type)) { | ||
@@ -10,0 +4,0 @@ return "object"; |
@@ -17,12 +17,12 @@ { | ||
"devDependencies": { | ||
"@babel/core": "7.8.6", | ||
"@babel/core": "7.9.0", | ||
"@babel/plugin-proposal-class-properties": "7.8.3", | ||
"@babel/preset-env": "7.8.6", | ||
"@typescript-eslint/eslint-plugin": "2.21.0", | ||
"@typescript-eslint/parser": "2.21.0", | ||
"@babel/preset-env": "7.9.0", | ||
"@typescript-eslint/eslint-plugin": "2.25.0", | ||
"@typescript-eslint/parser": "2.25.0", | ||
"babel-core": "7.0.0-bridge.0", | ||
"babel-eslint": "10.1.0", | ||
"eslint": "6.8.0", | ||
"eslint-config-prettier": "6.10.0", | ||
"eslint-config-standard": "14.1.0", | ||
"eslint-config-prettier": "6.10.1", | ||
"eslint-config-standard": "14.1.1", | ||
"eslint-plugin-import": "2.20.1", | ||
@@ -34,3 +34,3 @@ "eslint-plugin-node": "11.0.0", | ||
"jest": "25.1.0", | ||
"prettier": "1.19.1", | ||
"prettier": "2.0.1", | ||
"tslint-config-standard": "9.0.0", | ||
@@ -63,3 +63,3 @@ "typescript": "3.8.3" | ||
}, | ||
"version": "0.0.39" | ||
"version": "0.0.40" | ||
} |
@@ -14,8 +14,6 @@ ![CoreFunc](docs/img/logo_200.png?raw=true "CoreFunc") | ||
### CommonJS | ||
```javascript | ||
const arraySortStrings = | ||
require("@corefunc/corefunc/array/sort/strings.cjs"); | ||
const arraySortStrings = require("@corefunc/corefunc/array/sort/strings.cjs"); | ||
@@ -37,18 +35,18 @@ arraySortStrings(["c", "a", "b"]); | ||
- 🔎[Consono](https://consono.js.org)🔎 - | ||
The most informative and correct variable inspector for JavaScript on the web. | ||
- 🔎[Consono](https://consono.js.org)🔎 - | ||
The most informative and correct variable inspector for JavaScript on the web. | ||
- 🌠[OF](https://of.js.org)🌠 - Promise wrapper with some sugar. | ||
- 🌠[OF](https://of.js.org)🌠 - Promise wrapper with some sugar. | ||
- 🔩[Local Storage Fallback](https://github.com/r37r0m0d3l/fallback-local-storage)🔩 - | ||
Universal localStorage fallback. | ||
- 🔩[Local Storage Fallback](https://github.com/r37r0m0d3l/fallback-local-storage)🔩 - | ||
Universal localStorage fallback. | ||
- 🔄[Publish Subscribe](https://publish-subscribe.js.org)🔄 - | ||
JavaScript implementation of the Publish-Subscribe pattern. | ||
- 🔄[Publish Subscribe](https://publish-subscribe.js.org)🔄 - | ||
JavaScript implementation of the Publish-Subscribe pattern. | ||
- 🧰[Vicis](https://vicis.js.org)🧰 - Presentation and transformation layer for data output in RESTful APIs. | ||
- 🧰[Vicis](https://vicis.js.org)🧰 - Presentation and transformation layer for data output in RESTful APIs. | ||
Or find useful these tools: | ||
- 🧾[JSON Sorter](https://r37r0m0d3l.github.io/json_sort)🧾 - Neat online JSON sorter. | ||
- 🧾[JSON Sorter](https://r37r0m0d3l.github.io/json_sort)🧾 - Neat online JSON sorter. | ||
@@ -59,14 +57,14 @@ --- | ||
- https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore | ||
- https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore | ||
- https://github.com/lodash/lodash | ||
- https://github.com/lodash/lodash | ||
- https://www.30secondsofcode.org/js/p/1 | ||
- https://www.30secondsofcode.org/js/p/1 | ||
- https://github.com/liriliri/licia | ||
- https://github.com/liriliri/licia | ||
- https://github.com/panzerdp/voca | ||
- https://github.com/panzerdp/voca | ||
- https://github.com/mout/mout | ||
- https://github.com/mout/mout | ||
--- |
{ | ||
"extends": [ | ||
"config:base" | ||
] | ||
"extends": ["config:base"] | ||
} |
export default function variableType(value: any): boolean { | ||
return Object.prototype.toString | ||
.call(value) | ||
.slice(1, -1) | ||
.split(/[\s]+/u); | ||
return Object.prototype.toString.call(value).slice(1, -1).split(/[\s]+/u); | ||
} |
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
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
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
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
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
149924
376
5039
68
2