swc-plugin-negative-indices
v1.1.1
Published
A plugin for swc to transform ```let a = arr[-1];``` to ```let a = arr[arr.length - 1];``` ## Usage ```npm i swc-plugin-negative-indices``` .swcrc ```json { "jsc": { "experimental": { "plugins": [ [ "swc-plugin-negative-in
Downloads
5
Readme
swc-plugin-negative-indices
A plugin for swc to transform
let a = arr[-1];
to
let a = arr[arr.length - 1];
Usage
npm i swc-plugin-negative-indices
.swcrc
{
"jsc": {
"experimental": {
"plugins": [
[
"swc-plugin-negative-indices",
{}
]
]
}
}
}
Compatibility
I made this just for fun, let's see how many breaks unitl swc rust plugin api stable
|plugin|@swc/core| |--|--| |1.0.5 1.0.6 1.0.7 1.0.8|1.2.120|