apius 0.1.1 → 0.1.2
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/index.js +7 -7
- package/package.json +1 -1
package/index.js
CHANGED
@@ -1,19 +1,19 @@
|
|
1
1
|
import chalk from 'chalk'
|
2
2
|
export default {
|
3
|
-
|
3
|
+
color: (str, color, bold = false) => {
|
4
4
|
if(bold == false) {
|
5
|
-
return
|
5
|
+
return chalk[color](str)
|
6
6
|
} else if(bold == true) {
|
7
|
-
return
|
7
|
+
return chalk[color].bold(str)
|
8
8
|
}
|
9
9
|
},
|
10
10
|
|
11
|
-
|
11
|
+
rgb: (str, rgb, bold = false) => {
|
12
12
|
if(bold == false) {
|
13
13
|
const requestRGB = chalk.rgb(...rgb)
|
14
|
-
return
|
14
|
+
return requestRGB(str)
|
15
15
|
} else if(bold == true) {
|
16
|
-
return
|
16
|
+
return chalk.rgb(...rgb).bold(str)
|
17
17
|
}
|
18
18
|
},
|
19
19
|
|
@@ -26,7 +26,7 @@ export default {
|
|
26
26
|
}
|
27
27
|
},
|
28
28
|
|
29
|
-
|
29
|
+
numberGenerator: (min = 0, max = 100) => {
|
30
30
|
return Math.round(Math.random() * (max - min) + min)
|
31
31
|
},
|
32
32
|
|