UNPKG

@digitak/grubber

Version:

Parse code files and patch it without having to use an AST

12 lines (11 loc) 279 B
export default class Fragment { constructor(source, start, end, groups = []) { this.start = start; this.end = end; this.groups = groups; this.slice = source.slice(start, end); } get length() { return this.slice.length; } }