purified

0.0.2 • Public • Published

purified donate Coverage Status License: ISC

Purity and safety for methods invokes.

The power of Reflect.apply brought through natural arguments order to every JS engine.

purified(context, method[, args])

const $ = require('purified');
 
// trap ASAP methods to trust
const trim = ''.trim;
const fromCharCode = String.fromCharCode;
const hasOwnProperty = {}.hasOwnProperty;
 
// whenever is needed, you can trust your code
console.log(
  $(' abc ', trim),                 // "abc"
  $({z: 9}, hasOwnProperty, ['z']), // true
  $(String, fromCharCode, [79, 75]) // "OK
);

Package Sidebar

Install

npm i purified

Weekly Downloads

3

Version

0.0.2

License

ISC

Last publish

Collaborators

  • webreflection