npm.io
0.1.1 • Published 7 years ago

@ganuz/has-own

Licence
MIT
Version
0.1.1
Deps
2
Size
43 kB
Vulns
0
Weekly
0

@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.

Keywords