Detecting undefined, null, or empty strings. Mostly used for creating a better backend API
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
.gitignore
README.md
index.js
package.json

README.md

npm version

FuckingUndefinedEmptyNull

Detecting undefined, null, or empty strings. Eventually, I want to make this like the lonely operator equivalent (see ruby 2.3 feature) in javascript

Installation

npm i fuckingundefinedemptynull

Usage

var emptyStringCheck = require("fuckingundefinedemptynull").isStringSet;

var undefinedVariable;

if (emptyStringCheck(undefinedVariable)) {
    console.log("Variable is set");
} else {
    console.log("Variable is NOT set");
}