All Projects → ianstormtaylor → Is Empty

ianstormtaylor / Is Empty

Check whether a value is empty.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Is Empty

Browserselect
Browser Select is a utility to dynamically select the browser you want instead of just having one default for all links.
Stars: ✭ 154 (+227.66%)
Mutual labels:  utility, browser
Swift Selection Search
Swift Selection Search (SSS) is a simple Firefox add-on that lets you quickly search for some text in a page using your favorite search engines.
Stars: ✭ 125 (+165.96%)
Mutual labels:  utility, browser
Focus Ios
Firefox Focus for iOS
Stars: ✭ 989 (+2004.26%)
Mutual labels:  browser
Potato Library
Easy to use Utility library for Android
Stars: ✭ 45 (-4.26%)
Mutual labels:  utility
Qrcp
⚡ Transfer files over wifi from your computer to your mobile device by scanning a QR code without leaving the terminal.
Stars: ✭ 8,216 (+17380.85%)
Mutual labels:  utility
Chmap
The Windows `charmap` utility for Linux
Stars: ✭ 39 (-17.02%)
Mutual labels:  utility
Minipaint
online image editor
Stars: ✭ 1,014 (+2057.45%)
Mutual labels:  browser
Dom99
Extend html with directives
Stars: ✭ 37 (-21.28%)
Mutual labels:  browser
C Utils
Tiny, modular, drop-in, library of some most commonly used utility methods for C (embedded) applications. Intended to be used as a git-submodule inside your projects to kickstart development. See https://c-utils.gotomain.io for more details.
Stars: ✭ 47 (+0%)
Mutual labels:  utility
Myrtille
A native HTML4 / HTML5 Remote Desktop Protocol and SSH client
Stars: ✭ 1,007 (+2042.55%)
Mutual labels:  browser
Ngx Infinite Scroll
Infinite Scroll Directive for Angular
Stars: ✭ 1,024 (+2078.72%)
Mutual labels:  utility
Odysseus
Bridging the elementary OS and Web user experiences
Stars: ✭ 41 (-12.77%)
Mutual labels:  browser
Flutter mono kit
A collection of convenient widgets and utils made by mono.
Stars: ✭ 39 (-17.02%)
Mutual labels:  utility
Browser Logger
A dead simple logger, designed to be perfect for the browser.
Stars: ✭ 44 (-6.38%)
Mutual labels:  browser
Puppeteer Sharp Extra
Plugin framework for PuppeteerSharp
Stars: ✭ 39 (-17.02%)
Mutual labels:  browser
Jj
JSON Stream Editor (command line utility)
Stars: ✭ 1,033 (+2097.87%)
Mutual labels:  utility
Shifty
☀️ A macOS menu bar app that gives you more control over Night Shift.
Stars: ✭ 990 (+2006.38%)
Mutual labels:  utility
Wtf
Whitespace Total Fixer
Stars: ✭ 40 (-14.89%)
Mutual labels:  utility
Color.js
Extract colors from an image (0.75 KB) 🎨
Stars: ✭ 42 (-10.64%)
Mutual labels:  browser
Admin
AutoQuery + Admin UI for ServiceStack Projects
Stars: ✭ 47 (+0%)
Mutual labels:  browser

Archived: I wrote this package quite a while ago, and I'd consider it an anti-pattern. The main use case for it is checking if an object is empty, which can be done with lodash.isEmpty instead. In many other cases, it's easier and more clear for people reading your code to just check val.length === 0 or val.size === 0 instead of using a separate package for it. And people continue to ask for more things to be considered "empty" over time, which are breaking changes, and just make it harder to understand what the API this package really offers is. For that reason, I've archived this package and I don't recommend using it anymore.

is-empty

Check whether a value is empty.

Installation

$ npm install is-empty
$ npm test

Example

var empty = require('is-empty');

empty([]);              // true
empty({});              // true
empty('');              // true
empty(0);               // true
empty(function(){});    // true
empty(null);            // true
empty(undefined);       // true
empty(new Map());       // true
empty(new Set());       // true
empty(new Error());     // true

empty(true);            // false
empty(false);           // false
empty(['a', 'b']);      // false
empty({ a: 'b' });      // false
empty('string');        // false
empty(42);              // false
empty(function(a,b){}); // false
empty(new Map([['key', 'value']])); // false
empty(new Set([1]));    // false
empty(new Error('fail'))// false

API

isEmpty(value)

Check whether value is empty.

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].