mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-08 08:44:37 +08:00
A member export resolves to its binding only when the binding is declared
before the write and never reassigned, so a consumer reads the value the
member stored. A module that re-exports another module's exports through
module.exports = require("./x") now counts its own writes after the
re-exported module's: a member it adds resolves, and a member both modules
write stays refused. The exports rebinding refusal and its test now cover
the form that stays refused, exports = value without module.exports.
9 lines
169 B
JavaScript
9 lines
169 B
JavaScript
"use strict";
|
|
let counter = 1;
|
|
exports = module.exports = function metrics() {
|
|
return "metrics";
|
|
};
|
|
exports.counter = counter;
|
|
exports.version = "1.0.0";
|
|
counter = 5;
|