Skip to content

Commit 399c909

Browse files
committed
Use keep-func-props
1 parent da5cd9f commit 399c909

File tree

5 files changed

+13
-19
lines changed

5 files changed

+13
-19
lines changed

package-lock.json

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
"is-mergeable-object": "^1.1.0",
4646
"js-yaml": "^3.12.2",
4747
"json-schema-faker": "0.5.0-rc15",
48+
"keep-func-props": "^1.0.0",
4849
"lodash": "^4.17.10",
4950
"methods": "^1.1.2",
5051
"mimic-fn": "^1.2.0",

src/errors/handler.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict'
22

3-
const { keepProps } = require('../utils')
3+
const keepFuncProps = require('keep-func-props')
44

55
// Wrap a function with a error handler
66
// Allow passing an empty error handler, i.e. ignoring any error thrown
@@ -9,7 +9,7 @@ const addErrorHandler = function(func, errorHandler = () => {}) {
99
return errorHandledFunc.bind(null, func, errorHandler)
1010
}
1111

12-
const kAddErrorHandler = keepProps(addErrorHandler)
12+
const kAddErrorHandler = keepFuncProps(addErrorHandler)
1313

1414
const errorHandledFunc = function(func, errorHandler, ...args) {
1515
try {

src/utils/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ module.exports = {
44
...require('./types'),
55
...require('./promise'),
66
...require('./reduce'),
7-
...require('./keep_props'),
87
...require('./sort'),
98
...require('./location'),
109
...require('./simple_schema'),

src/utils/keep_props.js

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)