0.1.1 • Published 6 years ago

@ganuz/has-own v0.1.1

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

@ganuz/has-own

Source Code Version MIT License Bundle Size TypeScript

Has Own is package from Ganuz library

Install

$ yarn add @ganuz/has-own

Or

$ npm install --save @ganuz/has-own

Use

Module

import {
  default as hasOwn
} from '@ganuz/has-own';

Browser

<script src="https://unpkg.com/@ganuz/has-own/bundle.umd.min.js"></script>
let {
  hasOwn
} = G;

Examples

 hasOwn(null, 'foo'); // throw TypeError
 hasOwn(undefined, 0); // throw TypeError
 hasOwn('foo', 'toString'); // throw TypeError
 hasOwn([], 'length'); // => true
 hasOwn(Object, 'create'); // => true
 hasOwn({foo: 'bar'}, 'foo'); // => true
 hasOwn(Object.create({foo: 'bar'}), 'foo'); // => false

License

Copyright © Yisrael Eliev, Licensed under the MIT license.