@rustable/utils
Version:
Essential utilities for object cloning, string manipulation, and value comparison in TypeScript, inspired by Rust's standard library.
20 lines (16 loc) • 346 B
JavaScript
;
var clone = require('./clone.js');
;
const symbol = Symbol("val.ptr");
function Val(value) {
const cloned = clone.deepClone(value);
Object.defineProperty(cloned, symbol, {
value,
enumerable: false,
configurable: false,
writable: false
});
return cloned;
}
Val.ptr = symbol;
exports.Val = Val;