@zinaid/num 0.0.4 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/speller/index.d.ts +7 -0
- package/dist/speller/index.d.ts.map +1 -0
- package/dist/speller/index.js +13 -0
- package/package.json +8 -3
- package/dist/speller.d.ts +0 -7
- package/dist/speller.d.ts.map +0 -1
- package/dist/speller.js +0 -20
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { clamp as a, currency as l, defaultCurrency as o, defaultLocale as n, fileSize as s, forHumans as u, format as t, minutesToHuman as c, ordinal as m, pairs as p, parse as i, parseFloat as f, parseInt as d, percentage as y, secondsToHuman as C, spell as H, spellOrdinal as L, summarize as h, trim as w, useCurrency as x, useLocale as z, withCurrency as S, withLocale as T } from "./num.js";
|
|
2
|
-
import { Speller as F } from "./speller.js";
|
|
2
|
+
import { Speller as F } from "./speller/index.js";
|
|
3
3
|
export {
|
|
4
4
|
F as Speller,
|
|
5
5
|
a as clamp,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/speller/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,UAAU,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAEnC,qBAAa,OAAO;IAChB,SAAS,CAAC,OAAO,EAAE,WAAW,GAAG,SAAS,CAAC;IAE3C,SAAS,CAAC,UAAU,IAAI,OAAO;IAOxB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;CAG1C"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zinaid/num",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"description": "Utilities for working with numbers similar to Laravel's Num class facade.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -35,13 +35,18 @@
|
|
|
35
35
|
"require": "./dist/index.js",
|
|
36
36
|
"types": "./dist/index.d.ts"
|
|
37
37
|
},
|
|
38
|
+
"./*": {
|
|
39
|
+
"import": "./dist/*",
|
|
40
|
+
"require": "./dist/*",
|
|
41
|
+
"types": "./dist/*"
|
|
42
|
+
},
|
|
38
43
|
"./num": {
|
|
39
44
|
"import": "./dist/num.js",
|
|
40
45
|
"types": "./dist/num.d.ts"
|
|
41
46
|
},
|
|
42
47
|
"./speller": {
|
|
43
|
-
"import": "./dist/speller.js",
|
|
44
|
-
"types": "./dist/speller.d.ts"
|
|
48
|
+
"import": "./dist/speller/index.js",
|
|
49
|
+
"types": "./dist/speller/index.d.ts"
|
|
45
50
|
}
|
|
46
51
|
}
|
|
47
52
|
}
|
package/dist/speller.d.ts
DELETED
package/dist/speller.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"speller.d.ts","sourceRoot":"","sources":["../src/speller.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAExC,qBAAa,OAAO;IAChB,SAAS,CAAC,OAAO,EAAE,OAAO,GAAG,SAAS,CAAC;IAEvC,SAAS,CAAC,UAAU,IAAI,OAAO;IAWxB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;CAG1C"}
|
package/dist/speller.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { optionalRequire as s } from "@zinaid/utils";
|
|
2
|
-
class e {
|
|
3
|
-
toWords;
|
|
4
|
-
getToWords() {
|
|
5
|
-
if (!this.toWords) {
|
|
6
|
-
const o = s(
|
|
7
|
-
"to-words",
|
|
8
|
-
'The "to-words" package is required for spelling numbers. Please install it: npm install to-words'
|
|
9
|
-
).ToWords;
|
|
10
|
-
this.toWords = new o();
|
|
11
|
-
}
|
|
12
|
-
return this.toWords;
|
|
13
|
-
}
|
|
14
|
-
spellNumber(o) {
|
|
15
|
-
return this.getToWords().convert(o);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
export {
|
|
19
|
-
e as Speller
|
|
20
|
-
};
|