Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/johnny-shaman/melts
Object.assign is most important function on javascript
https://github.com/johnny-shaman/melts
Last synced: 20 days ago
JSON representation
Object.assign is most important function on javascript
- Host: GitHub
- URL: https://github.com/johnny-shaman/melts
- Owner: johnny-shaman
- License: gpl-3.0
- Created: 2018-01-20T23:11:14.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-01-24T17:55:51.000Z (about 7 years ago)
- Last Synced: 2024-11-22T20:37:17.926Z (3 months ago)
- Language: JavaScript
- Size: 17.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# melts
[![License](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](./LICENSE)
[![npm version](https://badge.fury.io/js/melts.svg)](https://badge.fury.io/js/melts)
[![Maintainability](https://api.codeclimate.com/v1/badges/18c0321897b83ed1703d/maintainability)](https://codeclimate.com/github/johnny-shaman/melts/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/18c0321897b83ed1703d/test_coverage)](https://codeclimate.com/github/johnny-shaman/melts/test_coverage)
[![Build Status](https://travis-ci.org/johnny-shaman/melts.svg?branch=master)](https://travis-ci.org/johnny-shaman/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.
## 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!