Skip to content

Latest commit

 

History

History
39 lines (29 loc) · 1.29 KB

README.md

File metadata and controls

39 lines (29 loc) · 1.29 KB

object-empty-validator

object-empty-validator-CI version install size downloads
Only the empty value of the object returns true. Empty array return false.

Installation

Install via NPM:

npm install object-empty-validator

Usage

Javascript

var objIsEmpty = require("object-empty-validator");

objIsEmpty.validate({}); // true
objIsEmpty.validate({a:1, b:2}); // false
objIsEmpty.validate([]); // false

TypeScript

import * as ObjIsEmpty from "object-empty-validator";

ObjIsEmpty.validate({}); // true
ObjIsEmpty.validate({a:1, b:2}); // false
ObjIsEmpty.validate([]); // false

Description

Korean