0.0.3 • Published 6 years ago

melts v0.0.3

Weekly downloads
2
License
GPL-3.0
Repository
github
Last release
6 years ago

melts

License npm version Maintainability Test Coverage Build Status

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!

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago

0.0.0

6 years ago