GithubHelp home page GithubHelp logo

http-errors-express's People

Contributors

olalonde avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

http-errors-express's Issues

Documentation is incorrect

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.