0.1.1 • Published 7 years ago
@ganuz/has-own v0.1.1
@ganuz/has-own
Has Own is package from Ganuz library
Install
$ yarn add @ganuz/has-ownOr
$ npm install --save @ganuz/has-ownUse
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'); // => falseLicense
Copyright © Yisrael Eliev, Licensed under the MIT license.