string-process.js 253 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 /** * 字符串处理 */ 'use strict'; /** * [判断数字] * @param {[string]} str [验证参数] * @return {[Boolean]} */ const _isNumeric = (str) => { return /^\d+(\.\d+)?$/.test(str); }; module.exports = { isNumeric: _isNumeric };