0.1.1 • Published 5 years ago

@ganuz/apply v0.1.1

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

@ganuz/apply

Source Code Version MIT License Bundle Size TypeScript

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.