binded / http-errors-express Goto Github PK
View Code? Open in Web Editor NEWExpress middleware for handling errors generated or compatible with http-errors.
Express middleware for handling errors generated or compatible with http-errors.
The current verion (2.0.1) published to npm incorrectly exports.
[brandon@tesla:~]$ node --version
v6.9.1
[brandon@tesla:~]$ npm view http-errors-express
{ name: 'http-errors-express',
description: 'Express middleware for handling errors created with the http-errors package.',
'dist-tags': { latest: '2.0.1' },
versions: [ '1.4.1', '2.0.0', '2.0.1' ],
maintainers: [ 'olalonde <[email protected]>' ],
time:
{ modified: '2016-10-27T04:57:47.744Z',
created: '2016-05-02T23:31:33.250Z',
'1.4.1': '2016-05-02T23:31:33.250Z',
'2.0.0': '2016-10-23T00:11:35.122Z',
'2.0.1': '2016-10-27T04:57:47.744Z' },
homepage: 'https://github.com/blockai/http-errors-express',
keywords: [ 'rest', 'express', 'errors', 'middleware' ],
repository:
{ type: 'git',
url: 'git://github.com/blockai/http-errors-express.git' },
author: 'Olivier Lalonde <[email protected]>',
bugs: { url: 'https://github.com/blockai/http-errors-express/issues' },
license: 'MIT',
readmeFilename: 'README.md',
version: '2.0.1',
main: 'lib/index.js',
scripts:
{ pretest: 'npm run lint',
build: 'babel ./src --out-dir ./lib --copy-files',
lint: 'eslint src/ test/',
prepublish: 'npm run build',
preversion: 'npm test',
test: 'babel-tape-runner test/*.js' },
devDependencies:
{ 'babel-cli': '^6.7.7',
'babel-plugin-transform-object-rest-spread': '^6.6.5',
'babel-preset-es2015': '^6.6.0',
'babel-tape-runner': '^2.0.1',
'blue-tape': '^0.2.0',
eslint: '^2.8.0',
'eslint-config-airbnb': '^8.0.0',
'eslint-plugin-import': '^1.6.1',
express: '^4.13.4',
'http-errors': '^1.4.0',
supertest: '^1.2.0',
'supertest-as-promised': '^3.1.0' },
gitHead: '3989c6c0d140292385096a38a52eba7437f19104',
dist:
{ shasum: '0c305cf8ae221821aa22ab352eaea308d5465142',
tarball: 'https://registry.npmjs.org/http-errors-express/-/http-errors-express-2.0.1.tgz' },
directories: {} }
[brandon@tesla:~]$ node
> var httpErrors = require('http-errors-express');
undefined
> typeof httpErrors
'object'
> typeof httpErrors.default
'function'
[brandon@tesla:~]$ grep exports node_modules/http-errors-express/lib/index.js
Object.defineProperty(exports, "__esModule", {
exports.default = function () {
If used in the primary documentation example, this module will throw a typeError:
app.use(httpErrors());
^
TypeError: httpErrors is not a function
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.