knex/knex.js

25 lines
600 B
JavaScript
Raw Normal View History

2015-05-02 13:14:32 -04:00
// Knex.js
// --------------
2016-08-09 13:33:47 -04:00
// (c) 2013-present Tim Griesser
// Knex may be freely distributed under the MIT license.
// For details and documentation:
// http://knexjs.org
// Should be safe to remove after support for Node.js 6 is dropped
2018-12-16 12:07:36 -06:00
if (
process.versions &&
process.versions.node &&
process.versions.node.startsWith('6.')
) {
const oldPromise = global.Promise;
require('@babel/polyfill');
2018-12-16 12:07:36 -06:00
// Preserve any Promise overrides set globally prior to importing knex
if (oldPromise) {
global.Promise = oldPromise;
}
}
module.exports = require('./lib/index');