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