fix type and make strict equal
This commit is contained in:
@ -6694,7 +6694,7 @@ const matchesWith = (obj, source, fn) =>
|
|||||||
key =>
|
key =>
|
||||||
obj.hasOwnProperty(key) && fn
|
obj.hasOwnProperty(key) && fn
|
||||||
? fn(obj[key], source[key], key, obj, source)
|
? fn(obj[key], source[key], key, obj, source)
|
||||||
: obj[key] == source[key]
|
: obj[key] === source[key]
|
||||||
);
|
);
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -7114,7 +7114,7 @@ truthCheckCollection([{ user: 'Tinky-Winky', sex: 'male' }, { user: 'Dipsy', sex
|
|||||||
|
|
||||||
### unflattenObject 
|
### unflattenObject 
|
||||||
|
|
||||||
Unlatten an object with the paths for keys.
|
Unflatten an object with the paths for keys.
|
||||||
|
|
||||||
Use `Object.keys(obj)` combined with `Array.reduce()` to convert flattened path node to a leaf node.
|
Use `Object.keys(obj)` combined with `Array.reduce()` to convert flattened path node to a leaf node.
|
||||||
If the value of a key contains a dot delimiter (`.`), use `Array.split('.')`, string transformations and `JSON.parse()` to create an object, then `Object.assign()` to create the leaf node.
|
If the value of a key contains a dot delimiter (`.`), use `Array.split('.')`, string transformations and `JSON.parse()` to create an object, then `Object.assign()` to create the leaf node.
|
||||||
|
|||||||
@ -11,7 +11,7 @@ const matchesWith = (obj, source, fn) =>
|
|||||||
key =>
|
key =>
|
||||||
obj.hasOwnProperty(key) && fn
|
obj.hasOwnProperty(key) && fn
|
||||||
? fn(obj[key], source[key], key, obj, source)
|
? fn(obj[key], source[key], key, obj, source)
|
||||||
: obj[key] == source[key]
|
: obj[key] === source[key]
|
||||||
);
|
);
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
### unflattenObject
|
### unflattenObject
|
||||||
|
|
||||||
Unlatten an object with the paths for keys.
|
Unflatten an object with the paths for keys.
|
||||||
|
|
||||||
Use `Object.keys(obj)` combined with `Array.reduce()` to convert flattened path node to a leaf node.
|
Use `Object.keys(obj)` combined with `Array.reduce()` to convert flattened path node to a leaf node.
|
||||||
If the value of a key contains a dot delimiter (`.`), use `Array.split('.')`, string transformations and `JSON.parse()` to create an object, then `Object.assign()` to create the leaf node.
|
If the value of a key contains a dot delimiter (`.`), use `Array.split('.')`, string transformations and `JSON.parse()` to create an object, then `Object.assign()` to create the leaf node.
|
||||||
|
|||||||
Reference in New Issue
Block a user