Socket
Socket
Sign inDemoInstall

deep-map

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

deep-map - npm Package Compare versions

Comparing version 1.4.0 to 1.4.1

4

lib/deep-map.d.ts

@@ -14,4 +14,4 @@ export interface MapFn {

map(value: any, key?: string | number): any;
private mapArray(arr, key);
private mapObject(obj, key);
private mapArray(arr);
private mapObject(obj);
}

@@ -11,7 +11,7 @@ "use strict";

DeepMap.prototype.map = function (value, key) {
return lodash_1.isArray(value) ? this.mapArray(value, key) :
lodash_1.isObject(value) ? this.mapObject(value, key) :
return lodash_1.isArray(value) ? this.mapArray(value) :
lodash_1.isObject(value) ? this.mapObject(value) :
this.mapFn.call(this.opts.thisArg, value, key);
};
DeepMap.prototype.mapArray = function (arr, key) {
DeepMap.prototype.mapArray = function (arr) {
if (this.cache.has(arr)) {

@@ -28,3 +28,3 @@ return this.cache.get(arr);

};
DeepMap.prototype.mapObject = function (obj, key) {
DeepMap.prototype.mapObject = function (obj) {
if (this.cache.has(obj)) {

@@ -35,5 +35,5 @@ return this.cache.get(obj);

this.cache.set(obj, result);
for (var key_1 in obj) {
if (obj.hasOwnProperty(key_1)) {
result[key_1] = this.map(obj[key_1], key_1);
for (var key in obj) {
if (obj.hasOwnProperty(key)) {
result[key] = this.map(obj[key], key);
}

@@ -40,0 +40,0 @@ }

{
"name": "deep-map",
"version": "1.4.0",
"version": "1.4.1",
"description": "Transforms nested values of complex objects",

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

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