0.0.5 • Published 3 years ago

@ostwindli/node v0.0.5

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

@ostwindli/node

a lot of js tools for nodejs

安装

$ yarn add @ostwindli/node

使用方法

const { isWin, isMac, isLinux } = require("@ostwindli/node");
isLinux();

功能清单



  getPortsPids: (ports: number | number[]) => Promise<any>;

  killPorts: (ports: number | number[]) => Promise<any>;

  getPort: (port?: number, must?: boolean) => Promise<unknown>;

  getIpV4: () => string;

  getIpV6: () => string;

  getPublicNetworkIp: () => Promise<string>;

  getGitUserInfo: () => Promise<string>;

  getAllMatchedFiles(dirPath: string, filterFun: (_file: string, stats: import("fs").Stats) => boolean, callback: (res: file.MatchedFiles[]) => void): void;