0.1.1 • Published 5 years ago

@ganuz/has v0.1.1

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

@ganuz/has

Source Code Version MIT License Bundle Size TypeScript

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.