We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4f62085 commit af84d5cCopy full SHA for af84d5c
pg.js
@@ -1,13 +1,10 @@
1
-var path = require('path')
2
-var pgPath;
3
//support both pg & pg.js
4
//this will eventually go away when i break native bindings
5
//out into their own module
6
try {
7
- pgPath = path.dirname(require.resolve('pg'))
+ module.exports.Result = require('pg/lib/result.js')
+ module.exports.prepareValue = require('pg/lib/utils.js').prepareValue
8
} catch(e) {
9
- pgPath = path.dirname(require.resolve('pg.js')) + '/lib'
+ module.exports.Result = require('pg.js/lib/result.js')
+ module.exports.prepareValue = require('pg.js/lib/utils.js').prepareValue
10
}
11
-
12
-module.exports.Result = require(path.join(pgPath, 'result.js'))
13
-module.exports.prepareValue = require(path.join(pgPath, 'utils.js')).prepareValue
0 commit comments