@corefunc/corefunc
Advanced tools
Comparing version 0.0.12 to 0.0.13
@@ -1,2 +0,1 @@ | ||
import fnIsArray from "lodash-es/isArray"; | ||
import fnIsObjectLike from "lodash-es/isObjectLike"; | ||
@@ -15,3 +14,3 @@ | ||
} | ||
if (fnIsArray(propertyNames) === false) { | ||
if (Array.isArray(propertyNames) === false) { | ||
return onFail; | ||
@@ -18,0 +17,0 @@ } |
import fnCloneDeep from "lodash-es/cloneDeep"; | ||
import fnHead from "lodash-es/head"; | ||
import fnIsArray from "lodash-es/isArray"; | ||
import fnKeys from "lodash-es/keys"; | ||
@@ -33,3 +32,3 @@ import fnSortBy from "lodash-es/sortBy"; | ||
} | ||
if (fnIsArray(iterable)) { | ||
if (Array.isArray(iterable)) { | ||
if (iterable.length === 0) { | ||
@@ -36,0 +35,0 @@ return defaultValue; |
@@ -1,2 +0,1 @@ | ||
import fnIsArray from "lodash-es/isArray"; | ||
import fnIsObjectLike from "lodash-es/isObjectLike"; | ||
@@ -19,3 +18,3 @@ import fnKeys from "lodash-es/keys"; | ||
} | ||
if (fnIsArray(iterable) || fnIsKeyed(iterable)) { | ||
if (Array.isArray(iterable) || fnIsKeyed(iterable)) { | ||
return Array.from(iterable.keys()); | ||
@@ -22,0 +21,0 @@ } |
@@ -1,2 +0,1 @@ | ||
import fnIsArray from "lodash-es/isArray"; | ||
import fnValues from "lodash-es/values"; | ||
@@ -12,3 +11,3 @@ | ||
function values(iterable) { | ||
if (fnIsArray(iterable)) { | ||
if (Array.isArray(iterable)) { | ||
return iterable; | ||
@@ -15,0 +14,0 @@ } |
/* eslint-disable no-restricted-properties */ | ||
/** | ||
* Returns the value of a number rounded to the nearest integer using precision parameter. | ||
* @param {Number} number | ||
* @param {Number} value | ||
* @param {Number} precision | ||
@@ -10,7 +10,5 @@ * @return {number} | ||
*/ | ||
function round(number, precision) { | ||
export default function numberRound(value: number, precision: number) { | ||
const factor = Math.pow(10, precision); // WARNING! DO NOT USE (10 ** precision)!!! IT BEHAVES DIFFERENTLY!!! | ||
return Math.round(number * factor) / factor; | ||
return Math.round(value * factor) / factor; | ||
} | ||
export default round; |
import fnCloneDeep from "lodash-es/cloneDeep"; | ||
import fnHasIn from "lodash-es/hasIn"; | ||
import fnIsArray from "lodash-es/isArray"; | ||
import fnIsObject from "lodash-es/isObject"; | ||
@@ -20,3 +19,3 @@ | ||
} | ||
const parts = fnIsArray(path) ? path : `${path}`.split("."); | ||
const parts = Array.isArray(path) ? path : `${path}`.split("."); | ||
let haystack = fnCloneDeep(object); | ||
@@ -23,0 +22,0 @@ for (let index = 0, length = parts.length; index < length; index++) { |
import fnCloneDeep from "lodash-es/cloneDeep"; | ||
import fnHasIn from "lodash-es/hasIn"; | ||
import fnIsArray from "lodash-es/isArray"; | ||
import fnIsFunction from "lodash-es/isFunction"; | ||
@@ -21,3 +20,3 @@ import fnIsObject from "lodash-es/isObject"; | ||
} | ||
const parts = fnIsArray(path) ? path : `${path}`.split("."); | ||
const parts = Array.isArray(path) ? path : `${path}`.split("."); | ||
let haystack = fnCloneDeep(object); | ||
@@ -24,0 +23,0 @@ for (let index = 0, length = parts.length; index < length; index++) { |
@@ -13,3 +13,2 @@ { | ||
"dependencies": { | ||
"@grafite/helpers": "latest", | ||
"lodash-es": "latest" | ||
@@ -64,3 +63,3 @@ }, | ||
}, | ||
"version": "0.0.12" | ||
"version": "0.0.13" | ||
} |
76096
1
193
2578
- Removed@grafite/helpers@latest
- Removed@grafite/helpers@1.0.2(transitive)
- Removedcamelcase@5.3.1(transitive)
- Removedpluralize@8.0.0(transitive)
- Removedslugify@1.6.6(transitive)
- Removedwindow-or-global@1.0.1(transitive)