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

0.1.1 • Public • Published

@ganuz/is-configurable

Source Code Version MIT License Bundle Size TypeScript

Is Configurable is package from Ganuz library

Install

$ yarn add @ganuz/is-configurable

Or

$ npm install --save @ganuz/is-configurable

Use

Module

import {
  default as isConfigurable
} from '@ganuz/is-configurable';

Browser

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

Examples

 isConfigurable(null, 'foo'); // throw TypeError
 isConfigurable({ foo: 'bar'}, 'foo'); // => true
 isConfigurable({}, 'foo'); // => true
 isConfigurable(class { static foo = 'bar'; }, 'foo'); // => true
 isConfigurable(Object.create(Object.create({}, {foo: {value: 'bar'}})), 'foo'); // => true
 isConfigurable(Object.create({}, {foo: {value: 'bar'}}), 'foo'); // => false
 isConfigurable([], 'length'); // => false
 isConfigurable(Object.freeze({foo: 'bar'}), 'foo'); // => false

@ganuz/is-configurable/assert

Module

import {
  default as assertConfigurable
} from '@ganuz/is-configurable/assert';

Browser

<script src="https://unpkg.com/@ganuz/is-configurable/assert/bundle.umd.min.js"></script>
let {
  assertConfigurable
} = G;

Examples

 assertConfigurable({}, 'foo'); // => {}
 assertConfigurable({foo: 'bar'}, 'foo'); // => {foo: 'bar'}
 assertConfigurable(Object.create({}, {foo: {value: 'bar'}}), 'foo'); // throw TypeError
 assertConfigurable(Object.freeze({foo: 'bar'}), 'foo'); // throw TypeError

License

Copyright © Yisrael Eliev, Licensed under the MIT license.

Package Sidebar

Install

npm i @ganuz/is-configurable

Weekly Downloads

1

Version

0.1.1

License

MIT

Unpacked Size

113 kB

Total Files

27

Last publish

Collaborators

  • yisraelx