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

0.1.1 • Public • Published

@ganuz/extend-properties

Source Code Version MIT License Bundle Size TypeScript

Extend Properties is package from Ganuz library

Install

$ yarn add @ganuz/extend-properties

Or

$ npm install --save @ganuz/extend-properties

Use

Module

import {
  default as extendProperties
} from '@ganuz/extend-properties';

Browser

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

Examples

 extendsProperties(null, {}); // throw TypeError
 extendsProperties({}, 'foo'); // throw TypeError
 extendsProperties({color: 'blue', num: 1}, {color: 'red', foo: 'bar'}); // => {color: 'blue', num: 1, foo: 'bar'}
 extendsProperties({foo: 'bar'}, {[Symbol.toStringTag]: 'Tag'}); // => Tag {foo: 'bar'}
 extendsProperties(Object.preventExtensions({name: 'bob'}), {name: 'alice', num: 9}); // => {name: 'bob'}
 extendsProperties({tea: true}, Object.create({foo: 'bar'}, {jeep: {value: false}})); // => {tea: true, jeep: true}
 getOwnPropertyDescriptor(extendsProperties({}, {set some(s){ this._s = s; }}), 'some'); // => {set(s){ this._s = s; }, ...}

License

Copyright © Yisrael Eliev, Licensed under the MIT license.

Package Sidebar

Install

npm i @ganuz/extend-properties

Weekly Downloads

3

Version

0.1.1

License

MIT

Unpacked Size

108 kB

Total Files

15

Last publish

Collaborators

  • yisraelx