1.0.0 • Published 5 years ago
mutatable v1.0.0
Mutatable
A mutatable value that can still be changed after being exported.
Install
npm install mutatable
Usage
const Mutatable = require("mutatable");
const myVal = new Mutatable();
someAsyncOperation().then(res => (myVal.exportable = res));
module.exports = myVal.exportable;
API
class
Mutatable(initialData?)
initialData
Type: any
The intial data to set.
instance
Mutatable
exportable
Type: any
The value which can be exported and modified.