@ganuz/get
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

@ganuz/get

Source Code Version MIT License Bundle Size TypeScript

Get is package from Ganuz library

Install

$ yarn add @ganuz/get

Or

$ npm install --save @ganuz/get

Use

Module

import {
  default as get
} from '@ganuz/get';

Browser

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

Examples

 get(undefined, 'foo'); // throw TypeError
 get({foo: 'bar'}, 'foo'); // => 'bar'
 get(['a', 'b', 'c'], 1); // => 'b'
 get({get color(){ return this._c; }, _c: 'red'}, 'color', {_c: 'green'}); // => 'green'
 get({get color(){ return this._c; }, _c: 'red'}, 'color', 55); // => undefined
 get({name: 'bob'}, 'name', {name: 'alice'}); // => 'bob'
 get(Object.create(null), 'constructor'); // => undefined

@ganuz/get/polyfill

Module

  import '@ganuz/get/polyfill';

Browser

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

License

Copyright © Yisrael Eliev, Licensed under the MIT license.

Package Sidebar

Install

npm i @ganuz/get

Weekly Downloads

3

Version

0.1.1

License

MIT

Unpacked Size

128 kB

Total Files

27

Last publish

Collaborators

  • yisraelx