posthtml-component
Advanced tools
Comparing version
{ | ||
"name": "posthtml-component", | ||
"version": "1.0.0-beta.11", | ||
"version": "1.0.0-beta.12", | ||
"description": "PostHTML Components Blade-like with slots, attributes as props and custom tag", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -112,3 +112,3 @@ [![NPM][npm]][npm-url] | ||
| **propsScriptAttribute** | `props` | String value used as attribute in `<script props>` parsed by the plugin to retrieve props of the component. | | ||
| **propsContext** | `props` | String value used as object name inside the script to process process before passed to the component. | | ||
| **propsContext** | `props` | String value used as object name inside the script to process props before passed to the component. | | ||
| **propsAttribute** | `props` | String value for props attribute to define props as JSON. | | ||
@@ -115,0 +115,0 @@ | **propsSlot** | `props` | String value used to retrieve the props passed to slot via `$slots.slotName.props`. | |
@@ -13,4 +13,15 @@ 'use strict'; | ||
const {setFilledSlots, processSlotContent, processFillContent} = require('./process-slots'); | ||
const defaults = require('lodash/defaults'); | ||
const assignWith = require('lodash/assignWith'); | ||
const mergeWith = require('lodash/mergeWith'); | ||
const template = require('lodash/template'); | ||
const get = require('lodash/get'); | ||
const has = require('lodash/has'); | ||
const isObjectLike = require('lodash/isObjectLike'); | ||
const isArray = require('lodash/isArray'); | ||
const isEmpty = require('lodash/isEmpty'); | ||
const isBoolean = require('lodash/isBoolean'); | ||
const isUndefined = require('lodash/isUndefined'); // value === undefined | ||
const isNull = require('lodash/isNull'); // value === null | ||
const isNil = require('lodash/isNil'); // value == null | ||
@@ -49,3 +60,17 @@ // const {inspect} = require('util'); | ||
options.strict = typeof options.strict === 'undefined' ? true : options.strict; | ||
options.utilities = options.utilities || {merge: mergeWith, template}; | ||
options.utilities = options.utilities || { | ||
defaults, | ||
assign: assignWith, | ||
merge: mergeWith, | ||
template, | ||
get, | ||
has, | ||
isObject: isObjectLike, | ||
isArray, | ||
isEmpty, | ||
isBoolean, | ||
isUndefined, | ||
isNull, | ||
isNil | ||
}; | ||
@@ -52,0 +77,0 @@ // Merge customizer callback passed to lodash mergeWith |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
54526
1.33%617
4.22%0
-100%