UNPKG
can-make-map
Version:
latest (1.2.2)
1.2.2
1.2.1
1.2.0
1.0.1
1.0.0
Convert a comma-separated string into a plain JavaScript object.
canjs.com
canjs/can-make-map
can-make-map
/
can-make-map-test.js
11 lines
(8 loc)
•
272 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
var
makeMap =
require
(
'./can-make-map'
);
var
QUnit
=
require
(
'steal-qunit'
);
QUnit
.
module
(
"can-make-map"
);
QUnit
.
test
(
"basics"
,
function
(
assert
) {
var
res =
makeMap
(
"a,b,c"
); assert.
deepEqual
(res, {
a
:
true
,
b
:
true
,
c
:
true
}); assert.
ok
(res
instanceof
Object
); });