摘要:
function safeGet (data, path){ if (!path) return undefined var paths = path.split('.') var res = data while (paths.length) { res = res[paths.shift()] 阅读全文
摘要:
例如:extractStr('My name is:Jerry. My age is:12.') // => ['Jerry', '12'] 阅读全文
摘要:
const toChineseNum = (num) => { const unit = ['', '十', '百', '千'] const counts = ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九'] const pre = Math.floor(num / 10000) const ne... 阅读全文