0.2.1 • Published 6 years ago
@pakal/tryify v0.2.1
@pakal/tryify
Tryify is package from Pakal library
Install
$ yarn add @pakal/tryify
Or
$ npm install --save @pakal/tryify
Use
Module
import {
default as tryify
} from '@pakal/tryify';
Browser
<script src="https://unpkg.com/@pakal/tryify/bundle.umd.min.js"></script>
let {
tryify
} = _;
Examples
tryify(function(){})(); // => true
tryify(() => false)(); // => true
tryify(function(){
throw TypeError
})(); // => false
tryify(Object.prototype.hasOwnProperty).call(null, 'foo'); // => false
License
Copyright © Yisrael Eliev, Licensed under the MIT license.