apius 0.0.4 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. package/README.md +24 -1
  2. package/index.js +8 -8
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1 +1,24 @@
1
- # apius-npm-package
1
+ # Apius
2
+
3
+ ## Installation
4
+
5
+ > npm i apius
6
+
7
+ ## Introduction
8
+
9
+ > A helpful package for node projects.
10
+
11
+ ## Code Samples
12
+
13
+ ```js
14
+ import apius from 'apius'
15
+
16
+ // - You can send colored log message!
17
+ apius.log("Hello world!", "color") // its can be bold. apius.log("hello world!", "color", true)
18
+
19
+ // - And you can use RGB codes!
20
+ apius.logRGB("Hello world!", [rgb code]) // its can be bold. apius.log("hello world!", [rgb code], true)
21
+
22
+ // - Also you can use hex codes!
23
+ apius.logHex("Hello world!", "hex code") // its can be bold. apius.logHex("hello world!", "hex code", true)
24
+ ```
package/index.js CHANGED
@@ -2,27 +2,27 @@ import chalk from 'chalk'
2
2
  export default {
3
3
  log: (str, color, bold = false) => {
4
4
  if(bold == false) {
5
- console.log(chalk[color](str))
5
+ return console.log(chalk[color](str))
6
6
  } else if(bold == true) {
7
- console.log(chalk[color].bold(str))
7
+ return console.log(chalk[color].bold(str))
8
8
  }
9
9
  },
10
10
 
11
11
  logRGB: (str, rgb, bold = false) => {
12
12
  if(bold == false) {
13
- const x = chalk.rgb
14
- console.log(chalk.rgb(rgb)(str))
13
+ const requestRGB = chalk.rgb(...rgb)
14
+ return console.log(requestRGB(str))
15
15
  } else if(bold == true) {
16
- console.log(chalk.rgb(rgb).bold(str))
16
+ return console.log(chalk.rgb(...rgb).bold(str))
17
17
  }
18
18
  },
19
19
 
20
20
  logHex: (str, hexCode, bold = false) => {
21
21
  if(bold == false) {
22
- const y = chalk.hex(hexCode)
23
- console.log(y(str))
22
+ const requestHex = chalk.hex(hexCode)
23
+ return console.log(requestHex(str))
24
24
  } else if(bold == true) {
25
- console.log(chalk.hex(hexCode).bold(str))
25
+ return console.log(chalk.hex(hexCode).bold(str))
26
26
  }
27
27
  }
28
28
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apius",
3
- "version": "0.0.4",
3
+ "version": "0.0.7",
4
4
  "description": "A simple package.",
5
5
  "main": "index.js",
6
6
  "type": "module",