0.4.2 • Published 4 years ago

property-checker v0.4.2

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

Property-Checker

Tests

A small library that can be used to check objects for certain properties.

Installation

npm install property-checker

Usage

const propCheck = require('property-checker');

propCheck.isString(string);
propCheck.isNumber(number);
propCheck.isFloat(number);
propCheck.isSymbol(symbol)
propCheck.isArray(array);
propCheck.is2dArray(array);
propCheck.isObject(object);

propCheck.isPopulatedArray(array);
propCheck.doesArrayContain(array, property);


propCheck.propertiesExist(object);
propCheck.doesPropertyExist(object, property);
propCheck.doesAnyPropertyExist(object, arrayOfProperties);
propCheck.doAllPropertiesExist(object, arrayOfProperties);

propCheck.isReadOnly(object, property);
propCheck.isPropertyEnumerable(object, property);
propcheck.isPropertyConfigurable(object, property);

All outputs are Booleans

0.4.1

4 years ago

0.4.2

4 years ago

0.4.0

6 years ago

0.3.0

6 years ago

0.2.1

6 years ago

0.1.2

6 years ago

0.1.0

7 years ago