1.0.1 • Published 5 years ago

@mili-handlers/additional-property v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

@mili-handlers/additional-property

version downloads license dependencies coveralls

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.

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.