amos-apptool 1.0.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/LICENSE +21 -0
- package/README.md +4 -0
- package/apis/objectPath.md +129 -0
- package/index.d.ts +861 -0
- package/lib/_clone.js +79 -0
- package/lib/_deepCopy.js +30 -0
- package/lib/_deepEqual.js +13 -0
- package/lib/_fastDeepEqual.js +38 -0
- package/lib/_forOwn.js +17 -0
- package/lib/_isnode.js +7 -0
- package/lib/_omit.js +19 -0
- package/lib/_parseJson.js +17 -0
- package/lib/_pick.js +20 -0
- package/lib/_pickBy.js +19 -0
- package/lib/_queue.js +72 -0
- package/lib/_shallowCopy.js +63 -0
- package/lib/_stringify.js +22 -0
- package/lib/_trim.js +15 -0
- package/lib/_typeOfList.js +29 -0
- package/lib/_uuids.js +56 -0
- package/lib/encrypt/_base64.js +39 -0
- package/lib/encrypt/_md5.js +130 -0
- package/lib/encrypt/des.js +539 -0
- package/lib/index.js +251 -0
- package/lib/math/_keyColor.js +158 -0
- package/lib/math/addition.js +25 -0
- package/lib/math/amountCase.js +18 -0
- package/lib/math/coinFormat.js +15 -0
- package/lib/math/colorUtil.js +261 -0
- package/lib/math/dateTime.js +154 -0
- package/lib/math/divide.js +21 -0
- package/lib/math/mul.js +29 -0
- package/lib/math/pwdStrength.js +11 -0
- package/lib/math/randomColor.js +31 -0
- package/lib/math/subtraction.js +25 -0
- package/lib/merged.js +16 -0
- package/lib/objectPath.js +126 -0
- package/lib/parseText.js +15 -0
- package/lib/pwdPolicy.js +38 -0
- package/lib/random.js +33 -0
- package/lib/shallowEqual.js +30 -0
- package/lib/strUtils.js +90 -0
- package/lib/url/encodeUrl.js +14 -0
- package/lib/url/restfulUrl.js +15 -0
- package/lib/utils.js +341 -0
- package/package.json +38 -0
package/lib/index.js
ADDED
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: !0
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
var _exportNames = {
|
|
10
|
+
Base64: !0,
|
|
11
|
+
MD5: !0,
|
|
12
|
+
DES: !0,
|
|
13
|
+
deepEqual: !0,
|
|
14
|
+
fastDeepEqual: !0,
|
|
15
|
+
isNode: !0,
|
|
16
|
+
omit: !0,
|
|
17
|
+
parseJson: !0,
|
|
18
|
+
pick: !0,
|
|
19
|
+
pickBy: !0,
|
|
20
|
+
Queue: !0,
|
|
21
|
+
shallowCopy: !0,
|
|
22
|
+
stringify: !0,
|
|
23
|
+
trim: !0,
|
|
24
|
+
UUID: !0,
|
|
25
|
+
merged: !0,
|
|
26
|
+
objectPath: !0,
|
|
27
|
+
parseText: !0,
|
|
28
|
+
pwdPolicy: !0,
|
|
29
|
+
random: !0,
|
|
30
|
+
strUtils: !0,
|
|
31
|
+
utils: !0,
|
|
32
|
+
addition: !0,
|
|
33
|
+
amountCase: !0,
|
|
34
|
+
coinFormat: !0,
|
|
35
|
+
colorUtil: !0,
|
|
36
|
+
dateTime: !0,
|
|
37
|
+
pwdStrength: !0,
|
|
38
|
+
randomColor: !0,
|
|
39
|
+
subtraction: !0,
|
|
40
|
+
accMul: !0,
|
|
41
|
+
accDivide: !0,
|
|
42
|
+
encodeUrl: !0,
|
|
43
|
+
restfulUrl: !0
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
Object.defineProperty(exports, "Base64", {
|
|
47
|
+
enumerable: !0,
|
|
48
|
+
get: function() {
|
|
49
|
+
return _base.default;
|
|
50
|
+
}
|
|
51
|
+
}), Object.defineProperty(exports, "DES", {
|
|
52
|
+
enumerable: !0,
|
|
53
|
+
get: function() {
|
|
54
|
+
return _des.default;
|
|
55
|
+
}
|
|
56
|
+
}), Object.defineProperty(exports, "MD5", {
|
|
57
|
+
enumerable: !0,
|
|
58
|
+
get: function() {
|
|
59
|
+
return _md.default;
|
|
60
|
+
}
|
|
61
|
+
}), Object.defineProperty(exports, "Queue", {
|
|
62
|
+
enumerable: !0,
|
|
63
|
+
get: function() {
|
|
64
|
+
return _queue.default;
|
|
65
|
+
}
|
|
66
|
+
}), Object.defineProperty(exports, "UUID", {
|
|
67
|
+
enumerable: !0,
|
|
68
|
+
get: function() {
|
|
69
|
+
return _uuids.default;
|
|
70
|
+
}
|
|
71
|
+
}), Object.defineProperty(exports, "accDivide", {
|
|
72
|
+
enumerable: !0,
|
|
73
|
+
get: function() {
|
|
74
|
+
return _divide.default;
|
|
75
|
+
}
|
|
76
|
+
}), Object.defineProperty(exports, "accMul", {
|
|
77
|
+
enumerable: !0,
|
|
78
|
+
get: function() {
|
|
79
|
+
return _mul.default;
|
|
80
|
+
}
|
|
81
|
+
}), Object.defineProperty(exports, "addition", {
|
|
82
|
+
enumerable: !0,
|
|
83
|
+
get: function() {
|
|
84
|
+
return _addition.default;
|
|
85
|
+
}
|
|
86
|
+
}), Object.defineProperty(exports, "amountCase", {
|
|
87
|
+
enumerable: !0,
|
|
88
|
+
get: function() {
|
|
89
|
+
return _amountCase.default;
|
|
90
|
+
}
|
|
91
|
+
}), Object.defineProperty(exports, "coinFormat", {
|
|
92
|
+
enumerable: !0,
|
|
93
|
+
get: function() {
|
|
94
|
+
return _coinFormat.default;
|
|
95
|
+
}
|
|
96
|
+
}), Object.defineProperty(exports, "colorUtil", {
|
|
97
|
+
enumerable: !0,
|
|
98
|
+
get: function() {
|
|
99
|
+
return _colorUtil.default;
|
|
100
|
+
}
|
|
101
|
+
}), Object.defineProperty(exports, "dateTime", {
|
|
102
|
+
enumerable: !0,
|
|
103
|
+
get: function() {
|
|
104
|
+
return _dateTime.default;
|
|
105
|
+
}
|
|
106
|
+
}), Object.defineProperty(exports, "deepEqual", {
|
|
107
|
+
enumerable: !0,
|
|
108
|
+
get: function() {
|
|
109
|
+
return _deepEqual.default;
|
|
110
|
+
}
|
|
111
|
+
}), Object.defineProperty(exports, "encodeUrl", {
|
|
112
|
+
enumerable: !0,
|
|
113
|
+
get: function() {
|
|
114
|
+
return _encodeUrl.default;
|
|
115
|
+
}
|
|
116
|
+
}), Object.defineProperty(exports, "fastDeepEqual", {
|
|
117
|
+
enumerable: !0,
|
|
118
|
+
get: function() {
|
|
119
|
+
return _fastDeepEqual.default;
|
|
120
|
+
}
|
|
121
|
+
}), Object.defineProperty(exports, "isNode", {
|
|
122
|
+
enumerable: !0,
|
|
123
|
+
get: function() {
|
|
124
|
+
return _isnode.default;
|
|
125
|
+
}
|
|
126
|
+
}), Object.defineProperty(exports, "merged", {
|
|
127
|
+
enumerable: !0,
|
|
128
|
+
get: function() {
|
|
129
|
+
return _merged.default;
|
|
130
|
+
}
|
|
131
|
+
}), Object.defineProperty(exports, "objectPath", {
|
|
132
|
+
enumerable: !0,
|
|
133
|
+
get: function() {
|
|
134
|
+
return _objectPath.default;
|
|
135
|
+
}
|
|
136
|
+
}), Object.defineProperty(exports, "omit", {
|
|
137
|
+
enumerable: !0,
|
|
138
|
+
get: function() {
|
|
139
|
+
return _omit.default;
|
|
140
|
+
}
|
|
141
|
+
}), Object.defineProperty(exports, "parseJson", {
|
|
142
|
+
enumerable: !0,
|
|
143
|
+
get: function() {
|
|
144
|
+
return _parseJson.default;
|
|
145
|
+
}
|
|
146
|
+
}), Object.defineProperty(exports, "parseText", {
|
|
147
|
+
enumerable: !0,
|
|
148
|
+
get: function() {
|
|
149
|
+
return _parseText.default;
|
|
150
|
+
}
|
|
151
|
+
}), Object.defineProperty(exports, "pick", {
|
|
152
|
+
enumerable: !0,
|
|
153
|
+
get: function() {
|
|
154
|
+
return _pick.default;
|
|
155
|
+
}
|
|
156
|
+
}), Object.defineProperty(exports, "pickBy", {
|
|
157
|
+
enumerable: !0,
|
|
158
|
+
get: function() {
|
|
159
|
+
return _pickBy.default;
|
|
160
|
+
}
|
|
161
|
+
}), Object.defineProperty(exports, "pwdPolicy", {
|
|
162
|
+
enumerable: !0,
|
|
163
|
+
get: function() {
|
|
164
|
+
return _pwdPolicy.default;
|
|
165
|
+
}
|
|
166
|
+
}), Object.defineProperty(exports, "pwdStrength", {
|
|
167
|
+
enumerable: !0,
|
|
168
|
+
get: function() {
|
|
169
|
+
return _pwdStrength.default;
|
|
170
|
+
}
|
|
171
|
+
}), Object.defineProperty(exports, "random", {
|
|
172
|
+
enumerable: !0,
|
|
173
|
+
get: function() {
|
|
174
|
+
return _random.default;
|
|
175
|
+
}
|
|
176
|
+
}), Object.defineProperty(exports, "randomColor", {
|
|
177
|
+
enumerable: !0,
|
|
178
|
+
get: function() {
|
|
179
|
+
return _randomColor.default;
|
|
180
|
+
}
|
|
181
|
+
}), Object.defineProperty(exports, "restfulUrl", {
|
|
182
|
+
enumerable: !0,
|
|
183
|
+
get: function() {
|
|
184
|
+
return _restfulUrl.default;
|
|
185
|
+
}
|
|
186
|
+
}), Object.defineProperty(exports, "shallowCopy", {
|
|
187
|
+
enumerable: !0,
|
|
188
|
+
get: function() {
|
|
189
|
+
return _shallowCopy.default;
|
|
190
|
+
}
|
|
191
|
+
}), Object.defineProperty(exports, "strUtils", {
|
|
192
|
+
enumerable: !0,
|
|
193
|
+
get: function() {
|
|
194
|
+
return _strUtils.default;
|
|
195
|
+
}
|
|
196
|
+
}), Object.defineProperty(exports, "stringify", {
|
|
197
|
+
enumerable: !0,
|
|
198
|
+
get: function() {
|
|
199
|
+
return _stringify.default;
|
|
200
|
+
}
|
|
201
|
+
}), Object.defineProperty(exports, "subtraction", {
|
|
202
|
+
enumerable: !0,
|
|
203
|
+
get: function() {
|
|
204
|
+
return _subtraction.default;
|
|
205
|
+
}
|
|
206
|
+
}), Object.defineProperty(exports, "trim", {
|
|
207
|
+
enumerable: !0,
|
|
208
|
+
get: function() {
|
|
209
|
+
return _trim.default;
|
|
210
|
+
}
|
|
211
|
+
}), Object.defineProperty(exports, "utils", {
|
|
212
|
+
enumerable: !0,
|
|
213
|
+
get: function() {
|
|
214
|
+
return _utils.default;
|
|
215
|
+
}
|
|
216
|
+
});
|
|
217
|
+
|
|
218
|
+
var _base = _interopRequireDefault(require("./encrypt/_base64")), _md = _interopRequireDefault(require("./encrypt/_md5")), _des = _interopRequireDefault(require("./encrypt/des")), _clone = require("./_clone");
|
|
219
|
+
|
|
220
|
+
Object.keys(_clone).forEach(function(e) {
|
|
221
|
+
"default" !== e && "__esModule" !== e && (Object.prototype.hasOwnProperty.call(_exportNames, e) || e in exports && exports[e] === _clone[e] || Object.defineProperty(exports, e, {
|
|
222
|
+
enumerable: !0,
|
|
223
|
+
get: function() {
|
|
224
|
+
return _clone[e];
|
|
225
|
+
}
|
|
226
|
+
}));
|
|
227
|
+
});
|
|
228
|
+
|
|
229
|
+
var _deepCopy = require("./_deepCopy");
|
|
230
|
+
|
|
231
|
+
Object.keys(_deepCopy).forEach(function(e) {
|
|
232
|
+
"default" !== e && "__esModule" !== e && (Object.prototype.hasOwnProperty.call(_exportNames, e) || e in exports && exports[e] === _deepCopy[e] || Object.defineProperty(exports, e, {
|
|
233
|
+
enumerable: !0,
|
|
234
|
+
get: function() {
|
|
235
|
+
return _deepCopy[e];
|
|
236
|
+
}
|
|
237
|
+
}));
|
|
238
|
+
});
|
|
239
|
+
|
|
240
|
+
var _deepEqual = _interopRequireDefault(require("./_deepEqual")), _fastDeepEqual = _interopRequireDefault(require("./_fastDeepEqual")), _isnode = _interopRequireDefault(require("./_isnode")), _omit = _interopRequireDefault(require("./_omit")), _parseJson = _interopRequireDefault(require("./_parseJson")), _pick = _interopRequireDefault(require("./_pick")), _pickBy = _interopRequireDefault(require("./_pickBy")), _queue = _interopRequireDefault(require("./_queue")), _shallowCopy = _interopRequireDefault(require("./_shallowCopy")), _stringify = _interopRequireDefault(require("./_stringify")), _trim = _interopRequireDefault(require("./_trim")), _uuids = _interopRequireDefault(require("./_uuids")), _merged = _interopRequireDefault(require("./merged")), _objectPath = _interopRequireDefault(require("./objectPath")), _parseText = _interopRequireDefault(require("./parseText")), _pwdPolicy = _interopRequireDefault(require("./pwdPolicy")), _random = _interopRequireDefault(require("./random")), _shallowEqual = require("./shallowEqual");
|
|
241
|
+
|
|
242
|
+
Object.keys(_shallowEqual).forEach(function(e) {
|
|
243
|
+
"default" !== e && "__esModule" !== e && (Object.prototype.hasOwnProperty.call(_exportNames, e) || e in exports && exports[e] === _shallowEqual[e] || Object.defineProperty(exports, e, {
|
|
244
|
+
enumerable: !0,
|
|
245
|
+
get: function() {
|
|
246
|
+
return _shallowEqual[e];
|
|
247
|
+
}
|
|
248
|
+
}));
|
|
249
|
+
});
|
|
250
|
+
|
|
251
|
+
var _strUtils = _interopRequireDefault(require("./strUtils")), _utils = _interopRequireDefault(require("./utils")), _addition = _interopRequireDefault(require("./math/addition")), _amountCase = _interopRequireDefault(require("./math/amountCase")), _coinFormat = _interopRequireDefault(require("./math/coinFormat")), _colorUtil = _interopRequireDefault(require("./math/colorUtil")), _dateTime = _interopRequireDefault(require("./math/dateTime")), _pwdStrength = _interopRequireDefault(require("./math/pwdStrength")), _randomColor = _interopRequireDefault(require("./math/randomColor")), _subtraction = _interopRequireDefault(require("./math/subtraction")), _mul = _interopRequireDefault(require("./math/mul")), _divide = _interopRequireDefault(require("./math/divide")), _encodeUrl = _interopRequireDefault(require("./url/encodeUrl")), _restfulUrl = _interopRequireDefault(require("./url/restfulUrl"));
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: !0
|
|
5
|
+
}), exports.default = void 0;
|
|
6
|
+
|
|
7
|
+
var colorKeyWordsHexStr = {
|
|
8
|
+
aliceblue: "#f0f8ff",
|
|
9
|
+
antiquewhite: "#faebd7",
|
|
10
|
+
aqua: "#00ffff",
|
|
11
|
+
aquamarine: "#7fffd4",
|
|
12
|
+
azure: "#f0ffff",
|
|
13
|
+
beige: "#f5f5dc",
|
|
14
|
+
bisque: "#ffe4c4",
|
|
15
|
+
black: "#000000",
|
|
16
|
+
blanchedalmond: "#ffebcd",
|
|
17
|
+
blue: "#0000ff",
|
|
18
|
+
blueviolet: "#8a2be2",
|
|
19
|
+
brown: "#a52a2a",
|
|
20
|
+
burlywood: "#deb887",
|
|
21
|
+
cadetblue: "#5f9ea0",
|
|
22
|
+
chartreuse: "#7fff00",
|
|
23
|
+
chocolate: "#d2691e",
|
|
24
|
+
coral: "#ff7f50",
|
|
25
|
+
cornflowerblue: "#6495ed",
|
|
26
|
+
cornsilk: "#fff8dc",
|
|
27
|
+
crimson: "#dc143c",
|
|
28
|
+
cyan: "#00ffff",
|
|
29
|
+
darkblue: "#00008b",
|
|
30
|
+
darkcyan: "#008b8b",
|
|
31
|
+
darkgoldenrod: "#b8860b",
|
|
32
|
+
darkgray: "#a9a9a9",
|
|
33
|
+
darkgreen: "#006400",
|
|
34
|
+
darkgrey: "#a9a9a9",
|
|
35
|
+
darkkhaki: "#bdb76b",
|
|
36
|
+
darkmagenta: "#8b008b",
|
|
37
|
+
darkolivegreen: "#556b2f",
|
|
38
|
+
darkorange: "#ff8c00",
|
|
39
|
+
darkorchid: "#9932cc",
|
|
40
|
+
darkred: "#8b0000",
|
|
41
|
+
darksalmon: "#e9967a",
|
|
42
|
+
darkseagreen: "#8fbc8f",
|
|
43
|
+
darkslateblue: "#483d8b",
|
|
44
|
+
darkslategray: "#2f4f4f",
|
|
45
|
+
darkslategrey: "#2f4f4f",
|
|
46
|
+
darkturquoise: "#00ced1",
|
|
47
|
+
darkviolet: "#9400d3",
|
|
48
|
+
deeppink: "#ff1493",
|
|
49
|
+
deepskyblue: "#00bfff",
|
|
50
|
+
dimgray: "#696969",
|
|
51
|
+
dimgrey: "#696969",
|
|
52
|
+
dodgerblue: "#1e90ff",
|
|
53
|
+
firebrick: "#b22222",
|
|
54
|
+
floralwhite: "#fffaf0",
|
|
55
|
+
forestgreen: "#228b22",
|
|
56
|
+
fuchsia: "#ff00ff",
|
|
57
|
+
gainsboro: "#dcdcdc",
|
|
58
|
+
ghostwhite: "#f8f8ff",
|
|
59
|
+
gold: "#ffd700",
|
|
60
|
+
goldenrod: "#daa520",
|
|
61
|
+
gray: "#808080",
|
|
62
|
+
green: "#008000",
|
|
63
|
+
greenyellow: "#adff2f",
|
|
64
|
+
grey: "#808080",
|
|
65
|
+
honeydew: "#f0fff0",
|
|
66
|
+
hotpink: "#ff69b4",
|
|
67
|
+
indianred: "#cd5c5c",
|
|
68
|
+
indigo: "#4b0082",
|
|
69
|
+
ivory: "#fffff0",
|
|
70
|
+
khaki: "#f0e68c",
|
|
71
|
+
lavender: "#e6e6fa",
|
|
72
|
+
lavenderblush: "#fff0f5",
|
|
73
|
+
lawngreen: "#7cfc00",
|
|
74
|
+
lemonchiffon: "#fffacd",
|
|
75
|
+
lightblue: "#add8e6",
|
|
76
|
+
lightcoral: "#f08080",
|
|
77
|
+
lightcyan: "#e0ffff",
|
|
78
|
+
lightgoldenrodyellow: "#fafad2",
|
|
79
|
+
lightgray: "#d3d3d3",
|
|
80
|
+
lightgreen: "#90ee90",
|
|
81
|
+
lightgrey: "#d3d3d3",
|
|
82
|
+
lightpink: "#ffb6c1",
|
|
83
|
+
lightsalmon: "#ffa07a",
|
|
84
|
+
lightseagreen: "#20b2aa",
|
|
85
|
+
lightskyblue: "#87cefa",
|
|
86
|
+
lightslategray: "#778899",
|
|
87
|
+
lightslategrey: "#778899",
|
|
88
|
+
lightsteelblue: "#b0c4de",
|
|
89
|
+
lightyellow: "#ffffe0",
|
|
90
|
+
lime: "#00ff00",
|
|
91
|
+
limegreen: "#32cd32",
|
|
92
|
+
linen: "#faf0e6",
|
|
93
|
+
magenta: "#ff00ff",
|
|
94
|
+
maroon: "#800000",
|
|
95
|
+
mediumaquamarine: "#66cdaa",
|
|
96
|
+
mediumblue: "#0000cd",
|
|
97
|
+
mediumorchid: "#ba55d3",
|
|
98
|
+
mediumpurple: "#9370db",
|
|
99
|
+
mediumseagreen: "#3cb371",
|
|
100
|
+
mediumslateblue: "#7b68ee",
|
|
101
|
+
mediumspringgreen: "#00fa9a",
|
|
102
|
+
mediumturquoise: "#48d1cc",
|
|
103
|
+
mediumvioletred: "#c71585",
|
|
104
|
+
midnightblue: "#191970",
|
|
105
|
+
mintcream: "#f5fffa",
|
|
106
|
+
mistyrose: "#ffe4e1",
|
|
107
|
+
moccasin: "#ffe4b5",
|
|
108
|
+
navajowhite: "#ffdead",
|
|
109
|
+
navy: "#000080",
|
|
110
|
+
oldlace: "#fdf5e6",
|
|
111
|
+
olive: "#808000",
|
|
112
|
+
olivedrab: "#6b8e23",
|
|
113
|
+
orange: "#ffa500",
|
|
114
|
+
orangered: "#ff4500",
|
|
115
|
+
orchid: "#da70d6",
|
|
116
|
+
palegoldenrod: "#eee8aa",
|
|
117
|
+
palegreen: "#98fb98",
|
|
118
|
+
paleturquoise: "#afeeee",
|
|
119
|
+
palevioletred: "#db7093",
|
|
120
|
+
papayawhip: "#ffefd5",
|
|
121
|
+
peachpuff: "#ffdab9",
|
|
122
|
+
peru: "#cd853f",
|
|
123
|
+
pink: "#ffc0cb",
|
|
124
|
+
plum: "#dda0dd",
|
|
125
|
+
powderblue: "#b0e0e6",
|
|
126
|
+
purple: "#800080",
|
|
127
|
+
rebeccapurple: "#663399",
|
|
128
|
+
red: "#ff0000",
|
|
129
|
+
rosybrown: "#bc8f8f",
|
|
130
|
+
royalblue: "#4169e1",
|
|
131
|
+
saddlebrown: "#8b4513",
|
|
132
|
+
salmon: "#fa8072",
|
|
133
|
+
sandybrown: "#f4a460",
|
|
134
|
+
seagreen: "#2e8b57",
|
|
135
|
+
seashell: "#fff5ee",
|
|
136
|
+
sienna: "#a0522d",
|
|
137
|
+
silver: "#c0c0c0",
|
|
138
|
+
skyblue: "#87ceeb",
|
|
139
|
+
slateblue: "#6a5acd",
|
|
140
|
+
slategray: "#708090",
|
|
141
|
+
slategrey: "#708090",
|
|
142
|
+
snow: "#fffafa",
|
|
143
|
+
springgreen: "#00ff7f",
|
|
144
|
+
steelblue: "#4682b4",
|
|
145
|
+
tan: "#d2b48c",
|
|
146
|
+
teal: "#008080",
|
|
147
|
+
thistle: "#d8bfd8",
|
|
148
|
+
tomato: "#ff6347",
|
|
149
|
+
turquoise: "#40e0d0",
|
|
150
|
+
violet: "#ee82ee",
|
|
151
|
+
wheat: "#f5deb3",
|
|
152
|
+
white: "#ffffff",
|
|
153
|
+
whitesmoke: "#f5f5f5",
|
|
154
|
+
yellow: "#ffff00",
|
|
155
|
+
yellowgreen: "#9acd32",
|
|
156
|
+
transparent: "rgba(0, 0, 0, 0)",
|
|
157
|
+
none: "rgba(0, 0, 0, 0)"
|
|
158
|
+
}, _default = exports.default = colorKeyWordsHexStr;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: !0
|
|
5
|
+
}), exports.default = accAddition;
|
|
6
|
+
|
|
7
|
+
var pow = function(t) {
|
|
8
|
+
return Math.pow(10, t);
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
function accAddition(t, r) {
|
|
12
|
+
var e, n;
|
|
13
|
+
try {
|
|
14
|
+
e = t.toString().split(".")[1].length;
|
|
15
|
+
} catch (t) {
|
|
16
|
+
e = 0;
|
|
17
|
+
}
|
|
18
|
+
try {
|
|
19
|
+
n = r.toString().split(".")[1].length;
|
|
20
|
+
} catch (t) {
|
|
21
|
+
n = 0;
|
|
22
|
+
}
|
|
23
|
+
var o = pow(Math.max(e, n));
|
|
24
|
+
return Number((t * o + r * o) / o);
|
|
25
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _default(e) {
|
|
4
|
+
var r = [ "角", "分", "厘" ], t = [ "零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖" ], a = [ [ "元", "万", "亿" ], [ "", "拾", "佰", "仟" ] ], l = e < 0 ? "欠人民币" : "人民币";
|
|
5
|
+
e = Math.abs(e);
|
|
6
|
+
for (var o = "", f = 0; f < r.length; f++) o += (t[Math.floor(10 * e * Math.pow(10, f)) % 10] + r[f]).replace(/零./, "");
|
|
7
|
+
o = o || "整", e = Math.floor(e);
|
|
8
|
+
for (var h = 0; h < a[0].length && e > 0; h++) {
|
|
9
|
+
for (var p = "", u = 0; u < a[1].length && e > 0; u++) p = t[e % 10] + a[1][u] + p,
|
|
10
|
+
e = Math.floor(e / 10);
|
|
11
|
+
o = p + a[0][h] + o;
|
|
12
|
+
}
|
|
13
|
+
return l + o.replace(/(零.)*零元/, "元").replace(/(零.)+/g, "零").replace(/^整$/, "零元整");
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
Object.defineProperty(exports, "__esModule", {
|
|
17
|
+
value: !0
|
|
18
|
+
}), exports.default = _default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: !0
|
|
7
|
+
}), exports.default = coinFormat;
|
|
8
|
+
|
|
9
|
+
var _utils = _interopRequireDefault(require("./../utils"));
|
|
10
|
+
|
|
11
|
+
function coinFormat(e, t, i) {
|
|
12
|
+
var r, o = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : "$", u = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : "";
|
|
13
|
+
return !isNaN(parseFloat(e)) && isFinite(e) ? (e = Number(e), (r = (e = (_utils.default.isNil(t) ? e : (Math.round(e * Math.pow(10, t)) / Math.pow(10, t)).toFixed(t)).toString()).split("."))[0] = r[0].toString().replace(/(\d)(?=(\d{3})+(?!\d))/g, "$1" + (i || ",")),
|
|
14
|
+
o + r.join(".") + u) : "";
|
|
15
|
+
}
|