@zoodogood/utils 1.0.2-3 → 1.0.4

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.
@@ -7,7 +7,7 @@ interface IContext {
7
7
  resolve: any;
8
8
  reject: any;
9
9
  };
10
- whenEnd: Promise<any>;
10
+ whenEnd: Promise<unknown>;
11
11
  child: ChildProcessWithoutNullStreams;
12
12
  emitter: EventsEmitter;
13
13
  outString: string;
@@ -18,7 +18,7 @@ interface IParams {
18
18
  }
19
19
  declare const _default: ({ root, logger }: IParams) => {
20
20
  run: (command: string, params: string[]) => IContext;
21
- info: (string: string) => void;
21
+ info: (log: string) => void;
22
22
  _npm: string;
23
23
  };
24
24
  export default _default;
@@ -56,7 +56,7 @@ export default ({ root, logger = false }) => {
56
56
  },
57
57
  },
58
58
  ];
59
- const info = (string) => console.info(`\x1b[1m${string}\x1b[22m`);
59
+ const info = (log) => console.info(`\x1b[1m${log}\x1b[22m`);
60
60
  const run = (command, params) => {
61
61
  const child = spawn(command, params, { cwd: root });
62
62
  const exitter = { resolve: null, reject: null };
@@ -1,6 +1,7 @@
1
1
  export * from './CustomCollector.js';
2
2
  export * from './GlitchText.js';
3
3
  export * from './getRandomValue.js';
4
+ export * from './rangeToArray.js';
4
5
  declare function omit(object: object, filter: CallableFunction): {
5
6
  [k: string]: any;
6
7
  };
@@ -1,6 +1,7 @@
1
1
  export * from './CustomCollector.js';
2
2
  export * from './GlitchText.js';
3
3
  export * from './getRandomValue.js';
4
+ export * from './rangeToArray.js';
4
5
  function omit(object, filter) {
5
6
  const entries = Object.entries(object)
6
7
  .filter(([key, value], i) => filter(key, value, i));
@@ -0,0 +1 @@
1
+ export declare function rangeToArray([min, max]: [number, number]): number | number[];
@@ -0,0 +1,6 @@
1
+ export function rangeToArray([min, max]) {
2
+ if (isNaN(min) || isNaN(max)) {
3
+ return NaN;
4
+ }
5
+ return [...new Array(max - min + 1)].map((_, index) => index + min);
6
+ }
package/package.json CHANGED
@@ -1,14 +1,15 @@
1
1
  {
2
2
  "name": "@zoodogood/utils",
3
3
  "type": "module",
4
- "version": "1.0.2-3",
4
+ "version": "1.0.4",
5
5
  "description": "",
6
6
  "main": "lib/index.js",
7
7
  "types": "lib/index.d.ts",
8
8
  "homepage": "https://zoodogood.github.io/utils",
9
9
  "scripts": {
10
10
  "test": "node index",
11
- "docs-build": "cd ./docs & retype build --output ./public",
11
+ "docs-build": "cd ./docs && retype build --output ./public",
12
+ "docs-watch": "cd ./docs && retype watch",
12
13
  "prepack": "tsc"
13
14
  },
14
15
  "typings": "lib/index",
@@ -29,7 +30,7 @@
29
30
  "devDependencies": {
30
31
  "@types/node": "^20.5.9",
31
32
  "discord.js": "^14.13.0",
32
- "retype": "^0.2.0",
33
+ "retypeapp-linux-x64": "^3.3.0",
33
34
  "typescript": "^5.2.2"
34
35
  },
35
36
  "peerDependencies": {