|
@@ -181,6 +181,19 @@ city(object, "New York") === object;
|
|
|
// => true
|
|
|
city2(object, "New York") === object;
|
|
|
// => true
|
|
|
+
|
|
|
+city(undefined, "London");
|
|
|
+// => {address: {city: "London"}}
|
|
|
+city(null, "London");
|
|
|
+// => {address: {city: "London"}}
|
|
|
+city({}, "London");
|
|
|
+// => {address: {city: "London"}}
|
|
|
+city({address: null}, "London");
|
|
|
+// => {address: {city: "London"}}
|
|
|
+city({address: {}}, "London");
|
|
|
+// => {address: {city: "London"}}
|
|
|
+city({address: {city: null}}, "London");
|
|
|
+// => {address: {city: "London"}}
|
|
|
```
|
|
|
|
|
|
If you put a number in a list of keys to use,
|