mirror of
https://github.com/yagop/node-telegram-bot-api
synced 2025-08-22 18:07:16 +00:00
* feat: Remove bluebird * docs: Update * remove depd ans use node native deprecate msg warnings * fix: correct util import name * remove: contributor dev dependencie and add list of contributors in the readme
14 lines
504 B
JavaScript
14 lines
504 B
JavaScript
/**
|
|
* If running on Nodejs 5.x and below, we load the transpiled code.
|
|
* Otherwise, we use the ES6 code.
|
|
* We are deprecating support for Node.js v5.x and below.
|
|
*/
|
|
const majorVersion = parseInt(process.versions.node.split('.')[0], 10);
|
|
if (majorVersion <= 5) {
|
|
const deprecate = require('./src/utils').deprecate;
|
|
deprecate('Node.js v5.x and below will no longer be supported in the future');
|
|
module.exports = require('./lib/telegram');
|
|
} else {
|
|
module.exports = require('./src/telegram');
|
|
}
|