1.2.1 • Published 6 months ago

a-transform-transformer v1.2.1

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

A-transformer-transformer

All Contributors

The a-transformer-transformer is a tool that allows you to migrate your Angular @Input()which are of type boolean or number to use the new transform property with the booleanAttribute or the numberAttribute transformer.

If you have @Input with existing decorator arguments for example (@Input({required: true})) the tool will merge them with the transform: booleanAttribute.

Installation

The package can either be installed locally inside your project as a dev dependency or globally. Since its a one time migration tool we think its best used with npx though.

Local

 npm i -D a-transformer-transformer

Global

 npm i -g a-transformer-transformer

npx

 npx a-transformer-transformer

Usage

To use the transformer just execute one of the following commands inside the root of your project.

Transform boolean

The transformer currently offers the option to add {transform: booleanAttribute} to your @Input() of type boolean. To do so you have to run the following command.

npx a-transformer-transformer -b

Transform numbers

The transformer currently offers the option to add {transform: numberAttribute} to your @Input() of type number. To do so you have to run the following command.

npx a-transformer-transformer -n

Transform all

To apply all available transformations you can run the following command.

npx a-transformer-transformer -a

Help

To get a list of all the available options you can always run the following command.

npx a-transformer-transformer -h

Contributors ✨

Thanks goes to these wonderful people (emoji key):

This project follows the all-contributors specification. Contributions of any kind welcome!

1.2.1

6 months ago

1.2.0

6 months ago

1.1.0

6 months ago

1.0.0

6 months ago