@ts-common/string-map
Advanced tools
Comparing version 0.0.10 to 0.0.11
@@ -13,2 +13,5 @@ import { Tuple2 } from "@ts-common/tuple"; | ||
} | ||
export declare type PartialStringMap<K extends string, V> = { | ||
readonly [k in K]: V; | ||
}; | ||
export interface MutableStringMap<T> { | ||
@@ -15,0 +18,0 @@ [key: string]: T; |
@@ -38,8 +38,6 @@ "use strict"; | ||
exports.map = (source, f) => exports.stringMap(_.map(exports.entries(source), f)); | ||
// TypeScript gives an error in case if type of a and type of b are different | ||
const isStrictEqual = (a, b) => a === b; | ||
// Performs a partial deep comparison between object and source to determine if object contains | ||
// equivalent property values. | ||
// See also https://lodash.com/docs/4.17.10#isMatch | ||
exports.isMatch = (object, source) => _.every(exports.entries(source), ([key, value]) => isStrictEqual(object[key], value)); | ||
exports.isEqual = (a, b) => isStrictEqual(a, b) || (exports.isMatch(a, b) && exports.isMatch(b, a)); | ||
exports.isMatch = (object, source) => _.every(exports.entries(source), ([key, value]) => _.isStrictEqual(object[key], value)); | ||
exports.isEqual = (a, b) => _.isStrictEqual(a, b) || (exports.isMatch(a, b) && exports.isMatch(b, a)); |
{ | ||
"name": "@ts-common/string-map", | ||
"version": "0.0.10", | ||
"version": "0.0.11", | ||
"description": "String Map", | ||
@@ -42,5 +42,5 @@ "main": "index.js", | ||
"dependencies": { | ||
"@ts-common/iterator": "0.0.31", | ||
"@ts-common/iterator": "0.0.32", | ||
"@ts-common/tuple": "0.0.0" | ||
} | ||
} |
70
16018
+ Added@ts-common/iterator@0.0.32(transitive)
- Removed@ts-common/iterator@0.0.31(transitive)
Updated@ts-common/iterator@0.0.32