@magic/deep 0.1.6 → 0.1.10

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
@@ -121,5 +121,18 @@ update dependencies
121
121
  ##### 0.1.6
122
122
  * merge now checks if o2.hasOwnProperty is a function before using it to check if we should overwrite keys of o1 or not.
123
123
 
124
- ##### 0.1.7 - unreleased
124
+ ##### 0.1.7
125
+ update @magic/types to avoid circular dependency
126
+
127
+ ##### 0.1.8
128
+ * update dependencies
129
+ * use @magic/types for all type comparisons
130
+
131
+ ##### 0.1.9
132
+ update dependencies
133
+
134
+ ##### 0.1.10
135
+ update dependencies
136
+
137
+ ##### 0.1.11 - unreleased
125
138
  ...
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@magic/deep",
3
- "version": "0.1.6",
3
+ "version": "0.1.10",
4
4
  "author": "Wizards & Witches",
5
5
  "description": "manipulate nested objects and arrays",
6
6
  "homepage": "https://github.com/magic/deep",
@@ -30,11 +30,11 @@
30
30
  "src"
31
31
  ],
32
32
  "dependencies": {
33
- "@magic/types": "0.1.15"
33
+ "@magic/types": "0.1.18"
34
34
  },
35
35
  "devDependencies": {
36
- "@magic/format": "0.0.22",
37
- "@magic/test": "0.1.66"
36
+ "@magic/format": "0.0.35",
37
+ "@magic/test": "0.2.0"
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