Skip to content

Commit

Permalink
feat: add npm debug mock (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe authored Feb 8, 2021
1 parent 83e9d70 commit fc088bf
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ const { alias, inject } = env(nodeless, {
- [depd](./src.runtime/npm/depd.ts)
- [mime-db](./src.runtime/npm/mime-db.ts)
- [mime](./src.runtime/npm/mime.ts)
- [debug](./src.runtime/npm/debug.ts)

## License

Expand Down
28 changes: 28 additions & 0 deletions src/runtime/npm/debug.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// https://www.npmjs.com/package/debug

const noop = () => {}
const debug = () => console.debug

Object.assign(debug, {
default: debug,
coerce: noop,
disable: noop,
enable: noop,
enabled: noop,
humanize: noop,
destroy: noop,
init: noop,
log: console.debug,
formatArgs: noop,
save: noop,
load: noop,
useColors: noop,
colors: [],
inspectOpts: {},
names: [],
skips: [],
formatters: {},
selectColors: noop
})

module.exports = debug

0 comments on commit fc088bf

Please sign in to comment.