colored-table 0.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.
Files changed (3) hide show
  1. package/README.md +3 -0
  2. package/index.js +24 -0
  3. package/package.json +31 -0
package/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # 这个名被我占用了
2
+
3
+ 但是你如果有需要,可以 [邮我转让](mailto:earthnut.dev@outlook.com)
package/index.js ADDED
@@ -0,0 +1,24 @@
1
+ import { readFileToJsonSync } from "a-node-tools";
2
+ import { default as pen } from "color-pen";
3
+ import { writeFileSync } from "node:fs";
4
+
5
+ const fileInfo = readFileToJsonSync("./info.json");
6
+
7
+ const npmLists = fileInfo.objects
8
+ .map((i) => i.package.name)
9
+ .filter((name) => name.length < 4)
10
+ .sort()
11
+ .reduce((accumulator, currentName, i) => {
12
+ // const pkgName = pen.hex(i % 255)(currentName);
13
+ // if (i % 3 === 2) {
14
+ // accumulator += pen(`${currentName.padEnd(36, " ")}\n${" ".repeat(4)}`);
15
+ // } else {
16
+ // accumulator += `${currentName.padEnd(36, " ")}`;
17
+ // }
18
+ accumulator += `${currentName.padEnd(3, " ")}\n`;
19
+ return accumulator;
20
+ }, " ".repeat(4));
21
+
22
+ console.log(npmLists);
23
+
24
+ writeFileSync("./npm-lists.txt", npmLists);
package/package.json ADDED
@@ -0,0 +1,31 @@
1
+ {
2
+ "name": "colored-table",
3
+ "version": "0.0.0",
4
+ "type": "module",
5
+ "main": "index.js",
6
+ "author": {
7
+ "name": "Earthnut",
8
+ "email": "earthnut.dev@outlook.com",
9
+ "url": "https://earthnut.dev"
10
+ },
11
+ "homepage": "https://earthnut.dev/vue",
12
+ "license": "ISC",
13
+ "description": "但是你如果有需要,可以邮我转让 <earthnut.dev@outlook.com>",
14
+ "files": [
15
+ "index.js"
16
+ ],
17
+ "bugs": {
18
+ "url": "https://github.com/lmssee/npm-earthnut-vue/issues"
19
+ },
20
+ "keywords": [
21
+ "earthnut"
22
+ ],
23
+ "repository": {
24
+ "type": "git",
25
+ "url": "git+https://github.com/lmssee/npm-earthnut-vue.git"
26
+ },
27
+ "publishConfig": {
28
+ "access": "public",
29
+ "registry": "https://registry.npmjs.org"
30
+ }
31
+ }