1
1
Layout = require ' ../../src/Layout'
2
- {object } = require ' utila'
2
+ merge = require ' lodash/merge'
3
+ {cloneAndMergeDeep } = require ' ../../src/tools'
3
4
4
5
{open , get , conf } = do ->
5
6
show = (layout ) ->
@@ -10,7 +11,7 @@ Layout = require '../../src/Layout'
10
11
linePrependor : options : amount : 2
11
12
12
13
c = (add = {}) ->
13
- object . append defaultBlockConfig, add
14
+ cloneAndMergeDeep defaultBlockConfig, add
14
15
15
16
ret = {}
16
17
@@ -29,22 +30,22 @@ Layout = require '../../src/Layout'
29
30
ret .conf = (props ) ->
30
31
config = {}
31
32
if props .left ?
32
- object . appendOnto config, linePrependor : options : amount : props .left
33
+ merge config, linePrependor : options : amount : props .left
33
34
34
35
if props .right ?
35
- object . appendOnto config, lineAppendor : options : amount : props .right
36
+ merge config, lineAppendor : options : amount : props .right
36
37
37
38
if props .top ?
38
- object . appendOnto config, blockPrependor : options : amount : props .top
39
+ merge config, blockPrependor : options : amount : props .top
39
40
40
41
if props .bottom ?
41
- object . appendOnto config, blockAppendor : options : amount : props .bottom
42
+ merge config, blockAppendor : options : amount : props .bottom
42
43
43
44
if props .width ?
44
- object . appendOnto config, width : props .width
45
+ merge config, width : props .width
45
46
46
47
if props .bullet is yes
47
- object . appendOnto config, linePrependor : options : bullet : {char : ' -' , alignment : ' left' }
48
+ merge config, linePrependor : options : bullet : {char : ' -' , alignment : ' left' }
48
49
49
50
config
50
51
0 commit comments