Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nolim1t/fuckingundefinedemptynull

Detecting undefined, null, or empty strings. Mostly used for creating a better backend API
https://github.com/nolim1t/fuckingundefinedemptynull

bs javascript library random

Last synced: 2 days ago
JSON representation

Detecting undefined, null, or empty strings. Mostly used for creating a better backend API

Awesome Lists containing this project

README

        

[![npm version](https://badge.fury.io/js/fuckingundefinedemptynull.svg)](https://badge.fury.io/js/fuckingundefinedemptynull)

# 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

```bash
npm i fuckingundefinedemptynull
```

## Usage

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

var undefinedVariable;

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