0.1.1 • Published 5 years ago

@ganuz/own-keys v0.1.1

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

@ganuz/own-keys

Source Code Version MIT License Bundle Size TypeScript

Own Keys is package from Ganuz library

Install

$ yarn add @ganuz/own-keys

Or

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

Use

Module

import {
  default as ownKeys
} from '@ganuz/own-keys';

Browser

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

Examples

 ownKeys('foo'); // => throw TypeError
 ownKeys([1, 2, 3]); // => ['0', '1', '2', 'length']
 ownKeys({foo: 'bar'}); // => ['foo']
 ownKeys(Object.create({foo: 'bar'}), {color: {value: 'red'}}); // => ['color']
 ownKeys({foo: 'bar', get [Symbol('foo')]() { return this.foo; }}); // => ['foo', Symbol(foo)]

@ganuz/own-keys/polyfill

Module

  import '@ganuz/own-keys/polyfill';

Browser

<script src="https://unpkg.com/@ganuz/own-keys/polyfill/bundle.umd.min.js"></script>

License

Copyright © Yisrael Eliev, Licensed under the MIT license.