Miss any of our Open RFC calls?Watch the recordings here! »

@ganuz/has-own

0.1.1 • Public • Published

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

Install

npm i @ganuz/has-own

DownloadsWeekly Downloads

0

Version

0.1.1

License

MIT

Unpacked Size

44.3 kB

Total Files

15

Last publish

Collaborators

  • avatar