mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-24 06:14:01 +08:00
15 lines
263 B
JavaScript
15 lines
263 B
JavaScript
// The diamond's tip: initialized once, at the FIRST require that reaches
|
|
// it (inside left.js), with one shared counter for everyone.
|
|
'use strict';
|
|
|
|
console.log('shared: init');
|
|
|
|
let n = 0;
|
|
|
|
function next() {
|
|
n += 1;
|
|
return n;
|
|
}
|
|
|
|
module.exports = { next };
|