Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@corefunc/corefunc

Package Overview
Dependencies
Maintainers
1
Versions
237
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@corefunc/corefunc - npm Package Compare versions

Comparing version 0.0.12 to 0.0.13

number/round.cjs

3

collection/atAny.ts

@@ -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"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc