@ganuz/has
v0.1.1
Published
Has is package from Ganuz library
Downloads
9
Maintainers
Readme
@ganuz/has
Has is package from Ganuz library
Install
$ yarn add @ganuz/has
Or
$ npm install --save @ganuz/has
Use
Module
import {
default as has
} from '@ganuz/has';
Browser
<script src="https://unpkg.com/@ganuz/has/bundle.umd.min.js"></script>
let {
has
} = G;
Examples
has([1], 0); // => true
has(null, 'foo'); // throw TypeError
has(v => v, 'prototype'); // => false
has('foo', 'toString'); // throw TypeError
has(1, 'valueOf'); // throw TypeError
has({color: 'green'}, 'color'); // => true
has(Object.create({foo: 'bar'}), 'foo'); // => true
@ganuz/has/polyfill
Module
import '@ganuz/has/polyfill';
Browser
<script src="https://unpkg.com/@ganuz/has/polyfill/bundle.umd.min.js"></script>
License
Copyright © Yisrael Eliev, Licensed under the MIT license.