File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change 14
14
Use [ can-define/map/map.prototype.serialize] when a form proper for ` JSON.stringify ` is needed.
15
15
16
16
``` js
17
- var map = new DefineMap ({foo: new DefineMap ({bar: " zed" })});
18
- map .get () // -> {foo: {bar: "zed"}};
17
+ import {DefineMap } from " can" ;
18
+
19
+ const map = new DefineMap ({foo: new DefineMap ({bar: " zed" })});
20
+ console .log ( map .get () ); // -> {foo: {bar: "zed"}};
19
21
```
22
+ @codepen
20
23
21
24
@return {Object} A plain JavaScript ` Object ` that contains all the properties and values of the map instance.
22
25
28
31
will be later via [ can-define/map/map.prototype.set] .
29
32
30
33
``` js
31
- var map = new DefineMap ();
32
- map .get (" name" ) // -> undefined;
34
+ import {DefineMap } from " can" ;
35
+
36
+ const map = new DefineMap ();
37
+ console .log ( map .get (" name" ) ); // -> undefined;
33
38
```
39
+ @codepen
34
40
35
41
@param {String} propName The property name of a property that may not have been defined yet.
36
42
@return {* } The value of that property.
You can’t perform that action at this time.
0 commit comments