1.0.1 • Published 5 years ago
@mili-handlers/additional-property v1.0.1
@mili-handlers/additional-property
The mili handler used to add property to file.addition
.
Usage
import addAdditionalProperty from '@mili-handlers/additional-property'
const rules = {
path: 'path_to_file',
handlers: [
// file.addition.key = 'values'
addAdditionalProperty('key', 'values'),
// file.addition.notProd = !resource.anwsers.isProd
addAdditionalProperty('notProd', ({ anwsers }) => !anwsers.isProd),
'mustache',
],
}
Sponsor
Support code development on patron.
Contributing & Development
If there is any doubt, it is very welcome to discuss the issue together. Please read Contributor Covenant Code of Conduct and CONTRIBUTING.