0.1.1 • Published 6 years ago
@ganuz/apply v0.1.1
@ganuz/apply
Apply is package from Ganuz library
Install
$ yarn add @ganuz/apply
Or
$ npm install --save @ganuz/apply
Use
Module
import {
default as apply
} from '@ganuz/apply';
Browser
<script src="https://unpkg.com/@ganuz/apply/bundle.umd.min.js"></script>
let {
apply
} = G;
Examples
apply(function() {}, null); // throw Error(...);
apply(class {}, null, []); // throw Error(...);
apply(() => 'beer', null, {}); // => 'beer'
apply(Math.abs, null, [-1]); // => 1
apply(function get(key) { return this[key];}, {foo: 'bar'}, ['foo']); // => 'bar'
(function(){
apply(() => console.log(this), null, []); // => Object
}).call(Object));
@ganuz/apply/polyfill
Module
import '@ganuz/apply/polyfill';
Browser
<script src="https://unpkg.com/@ganuz/apply/polyfill/bundle.umd.min.js"></script>
License
Copyright © Yisrael Eliev, Licensed under the MIT license.