@ganuz/has-own
v0.1.1
Published
Has Own is package from Ganuz library
Downloads
46
Maintainers
Readme
@ganuz/has-own
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.