0.2.1 • Published 7 years ago
@pakal/tryify v0.2.1
@pakal/tryify
Tryify is package from Pakal library
Install
$ yarn add @pakal/tryifyOr
$ npm install --save @pakal/tryifyUse
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'); // => falseLicense
Copyright © Yisrael Eliev, Licensed under the MIT license.