@stacksjs/strings 0.64.6 → 0.65.0
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/README.md +44 -44
- package/dist/case.d.ts +12 -0
- package/dist/helpers.d.ts +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +176 -2
- package/dist/index.js.map +170 -11
- package/dist/is.d.ts +43 -0
- package/dist/macro.d.ts +37 -0
- package/dist/pluralize.d.ts +23 -0
- package/dist/string.d.ts +6 -0
- package/dist/types.d.ts +1 -0
- package/dist/utils.d.ts +70 -0
- package/package.json +11 -16
- package/src/case.ts +1 -1
- package/src/helpers.ts +1 -1
- package/src/is.ts +42 -42
- package/src/macro.ts +39 -35
- package/src/pluralize.ts +6 -5
- package/src/string.ts +5 -3
- package/src/utils.ts +13 -10
package/README.md
CHANGED
|
@@ -22,72 +22,72 @@ import {
|
|
|
22
22
|
addPluralRule,
|
|
23
23
|
addSingularRule,
|
|
24
24
|
addUncountableRule,
|
|
25
|
-
isPlural,
|
|
26
|
-
isSingular,
|
|
27
|
-
singular,
|
|
28
|
-
plural,
|
|
29
|
-
|
|
30
25
|
// case
|
|
31
26
|
camelCase,
|
|
32
27
|
capitalCase,
|
|
33
28
|
constantCase,
|
|
34
29
|
dotCase,
|
|
35
|
-
headerCase,
|
|
36
|
-
kebabCase,
|
|
37
|
-
noCase,
|
|
38
|
-
paramCase,
|
|
39
|
-
pascalCase,
|
|
40
|
-
pathCase,
|
|
41
|
-
sentenceCase,
|
|
42
|
-
snakeCase,
|
|
43
|
-
titleCase,
|
|
44
30
|
|
|
45
|
-
|
|
46
|
-
isEmail,
|
|
47
|
-
isStrongPassword,
|
|
48
|
-
isAlphanumeric,
|
|
49
|
-
validateUsername,
|
|
50
|
-
isURL,
|
|
51
|
-
isMobilePhone,
|
|
31
|
+
headerCase,
|
|
52
32
|
isAlpha,
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
isBoolean,
|
|
57
|
-
isHexColor,
|
|
58
|
-
isHexadecimal,
|
|
33
|
+
isAlphanumeric,
|
|
34
|
+
isAscii,
|
|
35
|
+
isBase32,
|
|
59
36
|
isBase64,
|
|
60
|
-
|
|
61
|
-
|
|
37
|
+
isBoolean,
|
|
38
|
+
isByteLength,
|
|
62
39
|
isCreditCard,
|
|
63
|
-
isISBN,
|
|
64
|
-
isIP,
|
|
65
|
-
isIPRange,
|
|
66
|
-
isMACAddress,
|
|
67
|
-
isLatLong,
|
|
68
|
-
isLatitude,
|
|
69
|
-
isLongitude,
|
|
70
40
|
isCurrency,
|
|
71
41
|
isDataURI,
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
isBase32,
|
|
77
|
-
isByteLength,
|
|
42
|
+
isDate,
|
|
43
|
+
// validation
|
|
44
|
+
isEmail,
|
|
45
|
+
|
|
78
46
|
isFQDN,
|
|
79
47
|
isFullWidth,
|
|
80
48
|
isHalfWidth,
|
|
81
49
|
isHash,
|
|
50
|
+
isHexadecimal,
|
|
51
|
+
isHexColor,
|
|
82
52
|
isHSL,
|
|
83
53
|
isIBAN,
|
|
84
54
|
isIdentityCard,
|
|
55
|
+
isIP,
|
|
56
|
+
isIPRange,
|
|
57
|
+
isISBN,
|
|
85
58
|
isISIN,
|
|
86
59
|
isISO8601,
|
|
60
|
+
isISO31661Alpha2,
|
|
61
|
+
isISO31661Alpha3,
|
|
87
62
|
isISRC,
|
|
88
63
|
isISSN,
|
|
89
|
-
|
|
90
|
-
|
|
64
|
+
isJSON,
|
|
65
|
+
isJWT,
|
|
66
|
+
isLatitude,
|
|
67
|
+
isLatLong,
|
|
68
|
+
isLongitude,
|
|
69
|
+
isMACAddress,
|
|
70
|
+
isMimeType,
|
|
71
|
+
isMobilePhone,
|
|
72
|
+
isMongoId,
|
|
73
|
+
isNumeric,
|
|
74
|
+
isPlural,
|
|
75
|
+
isPostalCode,
|
|
76
|
+
isSingular,
|
|
77
|
+
isStrongPassword,
|
|
78
|
+
isURL,
|
|
79
|
+
isUUID,
|
|
80
|
+
kebabCase,
|
|
81
|
+
noCase,
|
|
82
|
+
paramCase,
|
|
83
|
+
pascalCase,
|
|
84
|
+
pathCase,
|
|
85
|
+
plural,
|
|
86
|
+
sentenceCase,
|
|
87
|
+
singular,
|
|
88
|
+
snakeCase,
|
|
89
|
+
titleCase,
|
|
90
|
+
validateUsername
|
|
91
91
|
} from '@stacksjs/strings'
|
|
92
92
|
|
|
93
93
|
console.log(camelCase('hello world')) // => "helloWorld"
|
package/dist/case.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* First letter uppercase, other lowercase
|
|
3
|
+
* @category string
|
|
4
|
+
* @example
|
|
5
|
+
* ```
|
|
6
|
+
* capitalize('hello world') => 'Hello world'
|
|
7
|
+
* ```
|
|
8
|
+
*/
|
|
9
|
+
export declare function capitalize(str: string): string;
|
|
10
|
+
export declare function lowercase(str: string): string;
|
|
11
|
+
export { camelCase, capitalCase, constantCase, dotCase, kebabCase, kebabCase as paramCase, noCase, pascalCase, pathCase, sentenceCase, snakeCase, split } from "change-case";
|
|
12
|
+
export { titleCase } from "title-case";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function toString(v: any): string;
|
package/dist/index.d.ts
ADDED