numeric-quantity:将整数加小数转换为十进制值

时间:2021-05-21 21:49:37
【文件属性】:
文件名称:numeric-quantity:将整数加小数转换为十进制值
文件大小:133KB
文件格式:ZIP
更新时间:2021-05-21 21:49:37
javascript converts fraction quantity TypeScript 数值量 将字符串转换为数字。 该字符串可以包含混合数字或粗俗的分数。 对于逆运算(将数字转换为英制尺寸),请检出 。 有关解析配方成分的更完整解决方案,请尝试 。 安装 npm # npm npm i numeric-quantity # yarn yarn add numeric-quantity 浏览器 在浏览器中,可用作全局函数numericQuantity 。 < script src =" https://unpkg.com/numeric-quantity " > </ script > < script > console . log ( numericQuantity ( '10 1/2' ) ) ; // 10.5 </ script > 用法 import numericQuantity from 'numeric-quantity' ; conso
【文件预览】:
numeric-quantity-master
----package.json(1KB)
----.github()
--------workflows()
----_config.yml(29B)
----tests()
--------browsertest.html(709B)
--------browsertest.js(3KB)
----LICENSE(1KB)
----src()
--------index.test.ts(3KB)
--------index.ts(4KB)
----tsconfig.json(1KB)
----.gitignore(43B)
----CHANGELOG.md(605B)
----README.md(2KB)
----yarn.lock(321KB)
----tsdx.config.js(157B)
----.vscode()
--------settings.json(33B)

网友评论