melts
v0.0.3
Published
Object.assign is most important function on javascript
Downloads
17
Maintainers
Readme
melts
Object.assign is most important function on javascript
usage of node.js...
npm install is.modern
and if use in script Ex.
const up = require("melts");usage of browser
git clone or download melts.js;
and if use on web Ex.
<script src="myjsFolder/melts.js"></script>usage of workers
git clone or download melts.js;
and if use on woker Ex.
importScripts(myjsFolder/melts.js, ...other)melts is Useful for Object.defineProperties
up === Object.assign.clone
up.c == {configurable: true}
up.e == {configurable: true, enumerable: true}
up.w == {configurable: true, writable: true}
up.a // allow all
Ex1:
Object.defineProperties(any, {
other: up(up.c, {
get () {
...
}
set (v) {
...
}
}),
mother: up(up.e, {
value: "Oh Mom ?"
}),
father: up(up.w {
value: "Oh Dad ?"
}),
another: up(up.a, {
value: 10
})
})and more ...
let MyConstruction = up(function (o) {
up(this, o);
}.prototype, {
me () {
this.keys.forEach((k) => console.log("k" + this[k]));
}
}).constructor;If Object.assign is shorten then it useful
It's enjoy hacking!
