Files
scriptc/tests/fixtures/npm/node_modules/counter/index.js
2026-07-22 18:08:04 -05:00

16 lines
215 B
JavaScript

export class Counter {
constructor(start) {
this.n = start;
}
inc(by) {
this.n += by;
return this;
}
value() {
return this.n;
}
label(prefix) {
return `${prefix}<${this.n}>`;
}
}