@@ -10,8 +10,19 @@ const processProps = require('./process-props');
10
10
const processAttributes = require ( './process-attributes' ) ;
11
11
const { processPushes, processStacks} = require ( './process-stacks' ) ;
12
12
const { setFilledSlots, processSlotContent, processFillContent} = require ( './process-slots' ) ;
13
+ const defaults = require ( 'lodash/defaults' ) ;
14
+ const assignWith = require ( 'lodash/assignWith' ) ;
13
15
const mergeWith = require ( 'lodash/mergeWith' ) ;
14
16
const template = require ( 'lodash/template' ) ;
17
+ const get = require ( 'lodash/get' ) ;
18
+ const has = require ( 'lodash/has' ) ;
19
+ const isObjectLike = require ( 'lodash/isObjectLike' ) ;
20
+ const isArray = require ( 'lodash/isArray' ) ;
21
+ const isEmpty = require ( 'lodash/isEmpty' ) ;
22
+ const isBoolean = require ( 'lodash/isBoolean' ) ;
23
+ const isUndefined = require ( 'lodash/isUndefined' ) ; // value === undefined
24
+ const isNull = require ( 'lodash/isNull' ) ; // value === null
25
+ const isNil = require ( 'lodash/isNil' ) ; // value == null
15
26
16
27
// const {inspect} = require('util');
17
28
// const debug = true;
@@ -45,7 +56,21 @@ module.exports = (options = {}) => tree => {
45
56
options . plugins = options . plugins || [ ] ;
46
57
options . attrsParserRules = options . attrsParserRules || { } ;
47
58
options . strict = typeof options . strict === 'undefined' ? true : options . strict ;
48
- options . utilities = options . utilities || { merge : mergeWith , template} ;
59
+ options . utilities = options . utilities || {
60
+ defaults,
61
+ assign : assignWith ,
62
+ merge : mergeWith ,
63
+ template,
64
+ get,
65
+ has,
66
+ isObject : isObjectLike ,
67
+ isArray,
68
+ isEmpty,
69
+ isBoolean,
70
+ isUndefined,
71
+ isNull,
72
+ isNil
73
+ } ;
49
74
50
75
// Merge customizer callback passed to lodash mergeWith
51
76
// for merge attribute `props` and all attributes starting with `merge:`
0 commit comments