node-easysms
Version:
EasySMS is an SMS sender for Node.js
15 lines (14 loc) • 385 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.RandomStrategy = void 0;
/**
* 网关策略 - 随机执行
* @param gateways 要排序的网关列表
* @returns
*/
const RandomStrategy = function (gateways) {
return gateways.sort((a, b) => {
return Math.random() - Math.random();
});
};
exports.RandomStrategy = RandomStrategy;