Skip to content

Commit 0dcfe77

Browse files
committed
Reverted addition of default export
1 parent 80bb466 commit 0dcfe77

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

index.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,6 @@ function highlight (sqlString, options) {
9292
return highlighted
9393
}
9494

95-
module.exports = highlight
96-
module.exports.highlight = (...args) => {
97-
console.warn('[sql-highlight] The use of the named exports will be deprecated in a future version of sql-highlight. See https://github.com/scriptcoded/sql-highlight/issues/5 for more information.')
98-
return highlight(...args)
95+
module.exports = {
96+
highlight
9997
}

test/index.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,8 @@
33
* that. It's just to see that it's working in the console.
44
*/
55

6-
const { highlight: highlightNamed } = require('../index')
7-
const highlight = require('../index')
6+
const { highlight } = require('../index')
87

98
console.log(highlight("SELECT COUNT(id), COUNT(id), `id`, `username` FROM `users` WHERE `email` = '[email protected]' AND `something` = 'oke' AND 1=1"))
109
console.log(highlight('SELECT "users".* FROM "users"'))
1110
console.log(highlight(`select "users".* from "users" where ("username" = 'test' or "email" = 'test') and "is_admin" = true and "is_banned" = false limit 1`))
12-
13-
console.log(highlightNamed('SELECT COUNT(bar) FROM foo'))

0 commit comments

Comments
 (0)