Socket
Book a DemoInstallSign in
Socket

http-reject-empty

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

http-reject-empty

A function to reject empty values with an http exception

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

http-reject-empty Build Status Coverage Status

A function to reject empty values with an http exception

Install

$ npm install --save http-reject-empty

Usage

const empty = require('http-reject-empty');

const promise = User.find({}) // find a user in the db
                  .then(empty);

If the promise returns a falsy value, the promise is rejected with a 404 http error

License

MIT © Noam Okman

Keywords

empty

FAQs

Package last updated on 13 Jul 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts