</>PackageGraphPackageGraph

http-assert

npmv1.5.0

assert with status codes

Not recommended for new projects

No — http-assert should not be adopted for new projects. Last published 1842 days ago. Pulls in 57 transitive packages, about 939 KB installed (at least — some of the tree is still being crawled).

  • ?Adoption: grade ?, Not reported by this registry.

    No download data reported for this package yet.

  • FMaintenance: grade F, Failing.

    Last published 1842 days ago.

  • CWeight: grade C, Fair — worth a look.

    Pulls in 57 transitive packages, about 939 KB installed (at least — some of the tree is still being crawled).

  • ASupply chain: grade A, Excellent.

    No install scripts, 3 maintainers, and a contained dependency surface.

  • ALicense: grade A, Excellent.

    MIT — permissive, with no copyleft found in the dependency tree.

Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.

Install cost

What you actually take on by adding http-assert to a project.

2
Direct dependencies

Runtime packages this one declares itself.

57
Total installed

Distinct packages in the full runtime tree, deduplicated the way a package manager would.

939 KB
Install size

Unpacked size of this package plus its entire runtime tree.

4
Tree depth

Longest resolved dependency chain below this package.

Part of this dependency tree has not been crawled yet, so these figures are a lower bound rather than a final total.

Licenses in the dependency tree

ISCMIT

Every license you inherit by installing http-assert, not just its own. Check this before a legal review, not after.

Compatibility

Node.js
node >= 0.8
Module format
CommonJS only
TypeScript
No bundled types
Install scripts
None

Quick start

A usage example from the http-assert README.

var assert = require('http-assert')
var ok = require('assert')

var username = 'foobar' // username from request

try {
  assert(username === 'fjodor', 401, 'authentication failed')
} catch (err) {
  ok(err.status === 401)
  ok(err.message === 'authentication failed')
  ok(err.expose)
}

http-assert vs the alternatives

Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.

PackageWeekly downloadsDependentsLicenseLast release
http-assertthis page01MIT5 years ago
content-type191.4M6MIT1 day ago
negotiator183.3M2MIT1 day ago
node-fetch172.9M9MIT1 day ago
undici158.5M15MIT1 day ago
http-errors149.4M7MIT1 day ago

Dependencies

Declared by http-assert v1.5.0. Runtime dependencies are installed with the package; dev dependencies are not.

Dev (9)

eslint 7.32.0eslint-config-standard 14.1.1eslint-plugin-import 2.24.2eslint-plugin-markdown 2.2.0eslint-plugin-node 11.1.0eslint-plugin-promise 4.3.1eslint-plugin-standard 4.1.0istanbul 0.4.5mocha 9.1.0

Used by

Popular packages that depend on http-assert.

Relationship graph

Dependencies (left) and dependents (right) of http-assert.

deep-equalhttp-errorskoahttp-assert
http-assert dependencies dependents

Frequently installed together

Release history

No releases in the last two years, typically about 231 days apart.

Recent versions of http-assert
VersionPublishedSizeLicense
1.5.0latest5 years ago8.9 KBMIT
1.4.17 years ago8.5 KBMIT
1.4.08 years ago8.5 KBMIT
1.3.09 years agoMIT
1.2.010 years agoMIT
1.1.111 years agoMIT
1.1.011 years agoMIT
1.0.212 years agoMIT
1.0.112 years agoMIT
1.0.012 years agoMIT
0.1.112 years agoMIT
0.1.012 years agoMIT
0.0.112 years agoMIT

Overview

http-assert is an npm package that assert with status codes. It has 1 known dependents in the graph. The latest version is 1.5.0, released under the MIT license.

Who should use it

Teams working in the npm ecosystem who need assert with status codes and value a focused solution.

When not to use it

Consider an alternative if you need to have first-class TypeScript types out of the box, or if a more actively-maintained option better fits your npm stack.

Pros

  • Clear open-source license (MIT).

Cons

  • No bundled TypeScript types (may require a separate @types package).

Auto-generated from collected registry metadata. No external claims are inferred.

Maintainers

Keywords

Frequently asked questions

Should I use http-assert?

No — http-assert should not be adopted for new projects. Last published 1842 days ago. Pulls in 57 transitive packages, about 939 KB installed (at least — some of the tree is still being crawled).

How do I install http-assert?

Run `npm install http-assert` to add http-assert to your npm project.

How many dependencies does http-assert have?

http-assert declares 11 direct dependencies and pulls in 57 packages in total once its runtime tree is resolved totalling about 939 KB on disk.

What license is http-assert released under?

http-assert is distributed under the MIT license. Its dependency tree also includes: ISC, MIT.

How popular is http-assert?

npm does not publish download counts. Within PackageGraph's crawl, 1 known packages depend on http-assert.

Is http-assert still maintained?

The most recent release of http-assert (v1.5.0) was published 5 years ago.

Does http-assert run install scripts?

No. http-assert does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.