Files
NapCatQQ/.pnpm-store/v3/files/76/2041709b4657f6a32b027859a57e466d4faf21614040b071a245c96c562786011b774dd4af205f6fffa18a17eb7252f046a186fb39829d38dad4928093714c
T
TanTan e311ca3275
Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

36 lines
635 B
Plaintext

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
/**
* @file 解析参数数组
* @author mengke01(kekee000@gmail.com)
*/
var SEGMENT_REGEX = /-?\d+(?:\.\d+)?(?:e[-+]?\d+)?\b/g;
/**
* 获取参数值
*
* @param {string} d 参数
* @return {number} 参数值
*/
function getSegment(d) {
return +d.trim();
}
/**
* 解析参数数组
*
* @param {string} str 参数字符串
* @return {Array} 参数数组
*/
function _default(str) {
if (!str) {
return [];
}
var matchs = str.match(SEGMENT_REGEX);
return matchs ? matchs.map(getSegment) : [];
}