@magic/deep 0.1.7 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -124,5 +124,9 @@ update dependencies
124
124
  ##### 0.1.7
125
125
  update @magic/types to avoid circular dependency
126
126
 
127
- ##### 0.1.8 - unreleased
127
+ ##### 0.1.8
128
+ * update dependencies
129
+ * use @magic/types for all type comparisons
130
+
131
+ ##### 0.1.9 - unreleased
128
132
  ...
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@magic/deep",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "author": "Wizards & Witches",
5
5
  "description": "manipulate nested objects and arrays",
6
6
  "homepage": "https://github.com/magic/deep",
@@ -33,8 +33,8 @@
33
33
  "@magic/types": "0.1.16"
34
34
  },
35
35
  "devDependencies": {
36
- "@magic/format": "0.0.26",
37
- "@magic/test": "0.1.71"
36
+ "@magic/format": "0.0.33",
37
+ "@magic/test": "0.1.77"
38
38
  },
39
39
  "contributors": [
40
40
  {
package/src/flatten.mjs CHANGED
@@ -1,4 +1,6 @@
1
- export const shallow = flat => (Array.isArray(flat) ? flatten(...flat) : flat)
1
+ import is from '@magic/types'
2
+
3
+ export const shallow = flat => (is.array(flat) ? flatten(...flat) : flat)
2
4
 
3
5
  export const concat = (flat, deep) => flat.concat(shallow(deep))
4
6
 
package/src/merge.mjs CHANGED
@@ -1,9 +1,9 @@
1
1
  import is from '@magic/types'
2
2
 
3
3
  export const merge = (o1, o2) => {
4
- if (typeof o1 === 'undefined') {
4
+ if (is.undefined(o1)) {
5
5
  return o2
6
- } else if (typeof o2 === 'undefined') {
6
+ } else if (is.undefined(o2)) {
7
7
  return o1
8
8
  }
9
9