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

core-functions

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

core-functions - npm Package Compare versions

Comparing version 3.0.21 to 3.0.22

8

arrays.js

@@ -0,1 +1,5 @@

'use strict';
const isInstanceOf = require('./objects').isInstanceOf;
/**

@@ -55,3 +59,3 @@ * Utilities for working with arrays.

const nonStrictType = type === String ? "string" : type === Number ? "number" : type === Boolean ? "boolean" : type;
return typeof nonStrictType === 'function' ? value.every(elem => elem instanceof nonStrictType) :
return typeof nonStrictType === 'function' ? value.every(elem => isInstanceOf(elem, nonStrictType)) :
nonStrictType === 'string' ? value.every(elem => typeof elem === 'string' || elem instanceof String) :

@@ -63,3 +67,3 @@ nonStrictType === 'number' ? value.every(elem => typeof elem === 'number' || elem instanceof Number) :

// Use strict matching
return typeOfType === 'function' ? value.every(elem => elem instanceof type) :
return typeOfType === 'function' ? value.every(elem => isInstanceOf(elem, type)) :
value.every(elem => typeof elem === type);

@@ -66,0 +70,0 @@ }

{
"name": "core-functions",
"version": "3.0.21",
"version": "3.0.22",
"description": "Core functions, utilities and classes for working with Node/JavaScript primitives and built-in objects, including strings, booleans, Promises, base 64, Arrays, Objects, standard AppErrors, etc.",

@@ -5,0 +5,0 @@ "author": "Byron du Preez",

@@ -1,2 +0,2 @@

# core-functions v3.0.21
# core-functions v3.0.22

@@ -3,0 +3,0 @@ Core functions, utilities and classes for working with Node/JavaScript primitives and built-in objects, including

## Changes
### 3.0.22
- Replaced two `instanceof` usages in `arrays` module with calls to `isInstanceOf`
### 3.0.21

@@ -4,0 +7,0 @@ - Added `toType` function to `any` module

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