automatic-semicolon-insertion
v3.0.6
Published
Insert missing semicolons, remove unneeded ones.
Downloads
54,268
Readme
automatic-semicolon-insertion
Insert missing semicolons, remove unneeded ones.
Install
$ npm install automatic-semicolon-insertion
Usage
import * as asi from 'automatic-semicolon-insertion';
import { parse } from '@codemod/parser';
const source = 'let a = class {}'; // should have a semicolon after it
console.log(asi.process(source, parse(source)));
/*
prints:
{ insertions: [ { index: 16, content: ';' } ], removals: [] }
*/