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

just-map-values

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

just-map-values - npm Package Compare versions

Comparing version 1.2.1 to 2.0.0

2

index.d.ts
// Definitions by: Roman Lerchster <https://github.com/wa4-fearless-otter>
declare function map<T extends {}>(item: T, callback: (value: any, key: string, object: T) => any): {};
export = map;
export default map;

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

import map = require("./index");
import map from './index'

@@ -6,16 +6,16 @@ const obj = {foo: {bar: []}};

// OK
map(obj, (value) => value + 1);
map(obj, (value, key) => value + 2);
map(obj, (value, key, object) => value + 3);
map(obj, (value) => value + 1);
map(obj, (value, key) => value + 2);
map(obj, (value, key, object) => value + 3);
// not OK
// @ts-expect-error
map();
map();
// @ts-expect-error
map((value) => value + 1);
map((value) => value + 1);
// @ts-expect-error
map(obj);
map(obj);
// @ts-expect-error
map(obj, '');
map(obj, '');
// @ts-expect-error
map(obj, {});
map(obj, {});
{
"name": "just-map-values",
"version": "1.2.1",
"version": "2.0.0",
"description": "map an object, predicate updates values, receives (value, key, object)",

@@ -23,2 +23,2 @@ "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