mirror of
https://github.com/yagop/node-telegram-bot-api
synced 2025-08-31 06:16:07 +00:00
src/telegram: Add shim for Array#findIndex()
Bug: Array#findIndex() is unavailable in Node.js v0.x. Since we are deprecating Node.js v0.x already, we can use a shim in the mean time. Once we stop supporting that version range, we can drop the shim entirely. tags: deprecate/node-v0.x
This commit is contained in:
@@ -25,9 +25,10 @@
|
|||||||
"author": "Yago Pérez <yagoperezs@gmail.com>",
|
"author": "Yago Pérez <yagoperezs@gmail.com>",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node" : ">=0.12"
|
"node": ">=0.12"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"array.prototype.findindex": "^2.0.0",
|
||||||
"bl": "^1.1.2",
|
"bl": "^1.1.2",
|
||||||
"bluebird": "^3.3.4",
|
"bluebird": "^3.3.4",
|
||||||
"debug": "^2.2.0",
|
"debug": "^2.2.0",
|
||||||
|
@@ -1,3 +1,6 @@
|
|||||||
|
// shims
|
||||||
|
require('array.prototype.findindex').shim(); // for Node.js v0.x
|
||||||
|
|
||||||
const TelegramBotWebHook = require('./telegramWebHook');
|
const TelegramBotWebHook = require('./telegramWebHook');
|
||||||
const TelegramBotPolling = require('./telegramPolling');
|
const TelegramBotPolling = require('./telegramPolling');
|
||||||
const debug = require('debug')('node-telegram-bot-api');
|
const debug = require('debug')('node-telegram-bot-api');
|
||||||
|
Reference in New Issue
Block a user