Skip to content

Commit

Permalink
Merge pull request #1071 from dhensby/pulls/5/inspect-deprecation
Browse files Browse the repository at this point in the history
FIX Dont use .inspect for util.inspect anymore
  • Loading branch information
dhensby committed Jul 24, 2020
2 parents 26f9b88 + c501b14 commit cce58be
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/datatypes.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
'use strict'
const inspect = Symbol.for('nodejs.util.inspect.custom')

const TYPES = {
VarChar (length) {
Expand Down Expand Up @@ -124,7 +125,7 @@ for (const key in TYPES) {
module.exports.DECLARATIONS[value.declaration] = value;

((key, value) => {
value.inspect = () => `[sql.${key}]`
value[inspect] = () => `[sql.${key}]`
})(key, value)
}
}
Expand Down

0 comments on commit cce58be

Please sign in to comment.