Skip to content

swtpumpkin/object-empty-validator

Repository files navigation

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