summaryrefslogtreecommitdiff
path: root/bin/wiki/ImportarDesdeURL/node_modules/whoops/lib/helpers.js
blob: c3ca43cb503117d96bbc7c2974768a0a67b31a5a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
'use strict'

module.exports = {
  isFunction: obj => typeof obj === 'function',
  isString: obj => typeof obj === 'string',
  composeErrorMessage: (code, description) => `${code}, ${description}`,
  inherits: (ctor, superCtor) => {
    ctor.super_ = superCtor
    ctor.prototype = Object.create(superCtor.prototype, {
      constructor: {
        value: ctor,
        enumerable: false,
        writable: true,
        configurable: true
      }
    })
  }
}