just-map-values
Advanced tools
Comparing version 1.2.1 to 2.0.0
// 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", | ||
} | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
38
3355