Socket
Socket
Sign inDemoInstall

node.extend

Package Overview
Dependencies
1
Maintainers
2
Versions
25
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.5 to 1.1.6

.eslintrc

115

.jscs.json
{
"es3": true,
"additionalRules": [],
"requireCurlyBraces": ["if", "else", "for", "while", "do", "try", "catch"],
"requireSemicolons": true,
"disallowMultipleSpaces": true,
"disallowIdentifierNames": [],
"requireCurlyBraces": {
"allExcept": [],
"keywords": ["if", "else", "for", "while", "do", "try", "catch"]
},
"requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"],

@@ -10,2 +21,16 @@

"disallowSpaceBeforeComma": true,
"disallowSpaceAfterComma": false,
"disallowSpaceBeforeSemicolon": true,
"disallowNodeTypes": [
"DebuggerStatement",
"LabeledStatement",
"SwitchCase",
"SwitchStatement",
"WithStatement"
],
"requireObjectKeysOnNewLine": { "allExcept": ["sameLine"] },
"requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true },

@@ -23,3 +48,3 @@ "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true },

"disallowQuotedKeysInObjects": "allButReserved",
"disallowQuotedKeysInObjects": { "allExcept": ["reserved"] },

@@ -59,3 +84,3 @@ "disallowSpaceAfterObjectKeys": true,

"requireDotNotation": true,
"requireDotNotation": { "allExcept": ["keywords"] },

@@ -69,4 +94,86 @@ "requireParenthesesAroundIIFE": true,

"mark": "'"
}
},
"disallowOperatorBeforeLineBreak": [],
"requireSpaceBeforeKeywords": [
"do",
"for",
"if",
"else",
"switch",
"case",
"try",
"catch",
"finally",
"while",
"with",
"return"
],
"validateAlignedFunctionParameters": {
"lineBreakAfterOpeningBraces": true,
"lineBreakBeforeClosingBraces": true
},
"requirePaddingNewLinesBeforeExport": true,
"validateNewlineAfterArrayElements": {
"maximum": 6
},
"requirePaddingNewLinesAfterUseStrict": true,
"disallowArrowFunctions": true,
"disallowMultiLineTernary": true,
"validateOrderInObjectKeys": false,
"disallowIdenticalDestructuringNames": true,
"disallowNestedTernaries": { "maxLevel": 1 },
"requireSpaceAfterComma": { "allExcept": ["trailing"] },
"requireAlignedMultilineParams": false,
"requireSpacesInGenerator": {
"afterStar": true
},
"disallowSpacesInGenerator": {
"beforeStar": true
},
"disallowVar": false,
"requireArrayDestructuring": false,
"requireEnhancedObjectLiterals": false,
"requireObjectDestructuring": false,
"requireEarlyReturn": false,
"requireCapitalizedConstructorsNew": {
"allExcept": ["Function", "String", "Object", "Symbol", "Number", "Date", "RegExp", "Error", "Boolean", "Array"]
},
"requireImportAlphabetized": false,
"requireSpaceBeforeObjectValues": true,
"requireSpaceBeforeDestructuredValues": true,
"disallowSpacesInsideTemplateStringPlaceholders": true,
"disallowArrayDestructuringReturn": false,
"requireNewlineBeforeSingleStatementsInIf": false,
"disallowUnusedVariables": true,
"requireSpacesInsideImportedObjectBraces": true,
"requireUseStrict": true
}

3

index.js

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

'use strict';
module.exports = require('./lib/extend');

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

'use strict';
/*!

@@ -12,3 +14,3 @@ * node.extend

function extend() {
var extend = function extend() {
var target = arguments[0] || {};

@@ -18,3 +20,3 @@ var i = 1;

var deep = false;
var options, name, src, copy, copy_is_array, clone;
var options, name, src, copy, copyIsArray, clone;

@@ -36,6 +38,6 @@ // Handle a deep copy situation

// Only deal with non-null/undefined values
options = arguments[i]
options = arguments[i];
if (options != null) {
if (typeof options === 'string') {
options = options.split('');
options = options.split('');
}

@@ -53,5 +55,5 @@ // Extend the base object

// Recurse if we're merging plain objects or arrays
if (deep && copy && (is.hash(copy) || (copy_is_array = is.array(copy)))) {
if (copy_is_array) {
copy_is_array = false;
if (deep && copy && (is.hash(copy) || (copyIsArray = is.array(copy)))) {
if (copyIsArray) {
copyIsArray = false;
clone = src && is.array(src) ? src : [];

@@ -86,2 +88,1 @@ } else {

module.exports = extend;
{
"name": "node.extend",
"version": "1.1.5",
"version": "1.1.6",
"description": "A port of jQuery.extend that actually works on node.js",

@@ -15,8 +15,10 @@ "keywords": [

"dependencies": {
"is": "^3.0.1"
"is": "^3.1.0"
},
"devDependencies": {
"tape": "^4.0.0",
"tape": "^4.6.0",
"covert": "^1.1.0",
"jscs": "^1.13.1"
"jscs": "^3.0.7",
"eslint": "^3.4.0",
"@ljharb/eslint-config": "^8.0.0"
},

@@ -35,10 +37,15 @@ "repository": {

"scripts": {
"test": "npm run lint && node test/index.js && npm run coverage-quiet",
"pretest": "npm run lint",
"test": "npm run --silent tests-only",
"posttest": "npm run coverage-quiet",
"tests-only": "node test",
"coverage": "covert test/index.js",
"coverage-quiet": "covert test/index.js --quiet",
"lint": "jscs *.js */*.js"
"lint": "npm run jscs && npm run eslint",
"jscs": "jscs *.js */*.js",
"eslint": "eslint *.js */*.js"
},
"engines": [
"node >= 0.4"
],
"engines": {
"node": ">=0.4.0"
},
"testling": {

@@ -45,0 +52,0 @@ "files": "test/index.js",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc