gajus/extract-price

parse result empty for 1 222 333,50

Open

#2 创建于 2020年9月17日

在 GitHub 查看
 (2 评论) (0 反应) (0 负责人)JavaScript (0 fork)github user discovery
enhancementhelp wanted

仓库指标

Star
 (16 star)
PR 合并指标
 (PR 指标待抓取)

描述

do you have test these ?

extractPrice('and space followed by "," notation 1 222 333,50');
// [{amount: 122233350}]

extractPrice('and space followed by "." notation 1 222 333.50');
// [{amount: 122233350}]

extractPrice('extracts multiple prices listed anywhere within the string using different formats: 1,22, 222, 3,22, 4.20, 5.666');
// [{amount: 12200}, {amount: 22200}, {amount: 322}, {amount: 422}, {amount: 566600}]

why i got [], with 1 222 333,50

贡献者指南