New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@all-in-js/utils

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@all-in-js/utils

> 常用的脚本操作函数集合,避免易出bug的点,统一交互风格

  • 1.1.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

utils

常用的脚本操作函数集合,避免易出bug的点,统一交互风格

Install

npm i @all-in-js/utils

Example

该包提供了一批易出bug的函数、易于调用的函数,如resolve, resolveCWD, resolveDirname, resolveHome等

  • git操作
// 有文件更改则提交更改

const { git } = require('@all-in-js/utils');

const { clean } = git.hasChanges;

if (!clean) {
  git.commitAll('update sth.');
}
  • vue-cli风格的logger
const { log } = require('@all-in-js/utils');

log.info('msg', 'tag');
  • 命令行spinner
const { spinner } = require('@all-in-js/utils');

spinner.step('start...');
// do sth
spinner.success('success');
  • npm操作
const { npm } = require('@all-in-js/utils');

const pkgTags = npm.tag.list('@all-in-js/utils');
  • 钉钉群消息提醒
const { DDWebhook } = require('@all-in-js/utils');

const secret = 'srcret';
const webhook = 'webhook';
new DDWebhook({
  secret,
  webhook
}).sendMessage('msg')
.then(console.log)
.catch(console.log);
  • ast抽象语法树操作
const { astCtrl } = require('@all-in-js/utils');

function visitorCreater(t) {
  // 
}

const code = astCtrl('code', visitorCreater);

Plan

持续完善中,欢迎加入!

FAQs

Package last updated on 24 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc