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

rc-util

Package Overview
Dependencies
Maintainers
4
Versions
211
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-util - npm Package Compare versions

Comparing version 4.5.0 to 4.5.1

21

es/debug/diff.js
import _typeof from 'babel-runtime/helpers/typeof';
import _toConsumableArray from 'babel-runtime/helpers/toConsumableArray';
import _extends from 'babel-runtime/helpers/extends';
/* eslint no-proto: 0 */
function createArray() {
var arr = [];
arr.__proto__ = new Array();
arr.__proto__.format = function toString() {
return this.map(function (obj) {
return _extends({}, obj, {
path: obj.path.join(' > ')
});
});
};
arr.__proto__.toString = function toString() {
return JSON.stringify(this.format(), null, 2);
};
return arr;
}
export default function diff(obj1, obj2) {
var depth = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 10;
var path = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
var diffList = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : [];
var diffList = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : createArray();

@@ -8,0 +27,0 @@ if (depth <= 0) return diffList;

@@ -15,2 +15,6 @@ 'use strict';

var _extends2 = require('babel-runtime/helpers/extends');
var _extends3 = _interopRequireDefault(_extends2);
exports['default'] = diff;

@@ -20,6 +24,24 @@

/* eslint no-proto: 0 */
function createArray() {
var arr = [];
arr.__proto__ = new Array();
arr.__proto__.format = function toString() {
return this.map(function (obj) {
return (0, _extends3['default'])({}, obj, {
path: obj.path.join(' > ')
});
});
};
arr.__proto__.toString = function toString() {
return JSON.stringify(this.format(), null, 2);
};
return arr;
}
function diff(obj1, obj2) {
var depth = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 10;
var path = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
var diffList = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : [];
var diffList = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : createArray();

@@ -26,0 +48,0 @@ if (depth <= 0) return diffList;

2

package.json
{
"name": "rc-util",
"version": "4.5.0",
"version": "4.5.1",
"description": "Common Utils For React Component",

@@ -5,0 +5,0 @@ "keywords": [

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