Socket
Socket
Sign inDemoInstall

utils-extend

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

utils-extend - npm Package Compare versions

Comparing version 1.0.7 to 1.0.8

13

index.js

@@ -9,4 +9,8 @@ /**

function isObject(value) {
return toString.call(value) === '[object Object]';
}
// And type check method: isFunction, isString, isNumber, isDate, isRegExp, isObject
['Function', 'String', 'Number', 'Date', 'RegExp', 'Object'].forEach(function(item) {
['Function', 'String', 'Number', 'Date', 'RegExp'].forEach(function(item) {
exports['is' + item] = function(value) {

@@ -36,4 +40,4 @@ return toString.call(value) === '[object ' + item + ']';

extend(target[key], value);
} else if (exports.isObject(value)) {
if (!exports.isObject(target[key])) {
} else if (isObject(value)) {
if (!isObject(target[key])) {
target[key] = {};

@@ -53,2 +57,5 @@ }

// fixed util.isObject
exports.isObject = isObject;
exports.extend = function() {

@@ -55,0 +62,0 @@ var args = Array.prototype.slice.call(arguments, 0);

{
"name": "utils-extend",
"version": "1.0.7",
"version": "1.0.8",
"description": "Extend nodejs util api, and it is light weight and simple",

@@ -5,0 +5,0 @@ "main": "index.js",

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