0.6.1 • Published 4 years ago

@sapphi-red/ts-transformer-for-of v0.6.1

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

ts-transformer-for-of

A TypeScript custom transformer which transforms multiple array methods to one for loop. Also this transforms for-of to a traditional for loop.

For now, Array::filter, Array::map and Array::forEach are only supported.

How to use the custom transformer

Unfortunately, TypeScript itself does not currently provide any easy way to use custom transformers (See Microsoft/TypeScript#14419). The followings are the example usage of the custom transformer.

See kimamula/ts-transformer-keys.
You can use this as it.

Caveats

Sparse arrays are not supported

Using this transformer with Sparse arrays, arrays with unfilled slots, may lead to unintended behavior. Before transforming the code, Array iteration methods will skip unfilled slots, but after transforming the code it will work as if it is filled with undefined.

License

MIT

Some code are from kimamula/ts-transformer-keys.
Copyright (c) 2017 Kenji Imamula
kimamula/ts-transformer-keys:/LICENSE

0.6.1

4 years ago

0.6.0

4 years ago

0.5.0

4 years ago

0.3.0

4 years ago

0.4.0

4 years ago

0.2.1

4 years ago

0.2.2

4 years ago

0.2.0

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago