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.32 to 0.0.33

check/isKeyed.cjs

2

check/isKeyed.ts

@@ -5,4 +5,4 @@ /**

*/
export default function checkIsKeyed(value) {
export default function checkIsKeyed(value: any): boolean {
return value instanceof Set || value instanceof Map;
}
/**
* @name isPrimitive
* @name checkIsPrimitive
* @description Return true on boolean, string, number, BigInt, null, Symbol and undefined

@@ -7,4 +7,4 @@ * @param {*} value

*/
export default function isPrimitive(value: any): boolean {
export default function checkIsPrimitive(value: any): boolean {
return Object(value) !== value;
}

@@ -1,6 +0,4 @@

import fnIsObjectLike from "lodash-es/isObjectLike";
import fnKeys from "lodash-es/keys";
import checkIsKeyed from "../check/isKeyed";
import checkIsObjectLike from "../check/isObjectLike";
import fnIsKeyed from "../is/isKeyed";
/**

@@ -11,15 +9,13 @@ * Pick object property from list of names

*/
function keys(iterable) {
export default function collectionKeys(iterable: any): any[] {
if (!iterable) {
return [];
}
if (fnIsObjectLike(iterable) === false) {
if (Array.isArray(iterable) || checkIsKeyed(iterable)) {
return Array.from(iterable.keys());
}
if (checkIsObjectLike(iterable) === false) {
return [];
}
if (Array.isArray(iterable) || fnIsKeyed(iterable)) {
return Array.from(iterable.keys());
}
return fnKeys(iterable);
return Object.keys(iterable);
}
export default keys;

@@ -61,3 +61,3 @@ {

},
"version": "0.0.32"
"version": "0.0.33"
}

@@ -0,1 +1,3 @@

![CoreFunc](docs/img/logo_200.png?raw=true "CoreFunc")
# CoreFunc

@@ -2,0 +4,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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