8000 GitHub - unmonk/property-checker: A small library that can be used to check objects for certain properties.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Apr 1, 2023. It is now read-only.
/ property-checker Public archive

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

License

Notifications You must be signed in to change notification settings

unmonk/property-checker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors 2

  •  
  •  
0