npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

baiying-utils

v1.1.7

Published

百应低代码工具包

Downloads

37

Readme

发布说明

index.js 为方法的集成抛出点。src文件夹下面存放所有的工具方法

目录结构

├── build (编译后的文件存放地址)
├── src (所有js/ts的存放目录)
├── .gitignore
├── .npmignore(发布npm过滤规则)
├── index.js
├── package.json
├── README.md
├── webpack.config.js 

发布前操作


//如果上一次发布版本为1.0.0
npm version patch // 升级小版本,为1.0.1
npm version minor // 升级中版本,为1.1.0
npm version major // 升级大版本,为2.0.0
  1. 登录npm 账号
    1. npm login
    2. 输入username
    3. 输入password(密码不可见,正常输入就行)
    4. 输入email(注册npmjs的邮箱)
    5. 邮箱查看临时密码输入
  2. package.json文件中修改version版本号
  3. 编译代码兼容语法命令:npm run build
  4. 发布命令:npm publish

操作文档

- 处理公式

processingFormulas(formula,fields)

参数

| 参数 | 类型 | 默认值 | 描述 | | --- | --- | --- | --- | | formula | String | “” | 公式 | | fields | Object | {} | 表单键值对象 |

💡 注意,该方法使用了eval函数,在小程序中无法使用

请求示例

可以仅传递部分请求参数。

import { processingFormulas } from "baiyingutil";

function test(){
  let a = "ABS(#{num}+1)";
  let b = {num:-10}
  let c = processingFormulas(a,b)
  console.log(c)
  //打印 9
}

- 处理数据联动逻辑(旧版本)

handleLinkDataLogic(item,currentLinkDataFieldId,formData)

参数

| 参数 | 类型 | 默认值 | 描述 | | --- | --- | --- | --- | | item | Object | {} | 组件字段 | | currentLinkDataFieldId | String | "" | 当前触发的字段 | | formData | Object | {} | 当前表单的值 |

返回值Promise

请求示例

可以仅传递部分请求参数。

import { handleLinkDataLogic } from "baiyingutil";


function test(){
    handleLinkDataLogic(item, fieldId, formModel).then(data => {
      startLinkage(item, fd, data, linkFunc)
    }).catch(err=>{
    })
}

- 处理数据联动逻辑(新版本)

handleLinkDataLogicV2(item,currentLinkDataFieldId,formData)

参数

| 参数 | 类型 | 默认值 | 描述 | | --- | --- | --- | --- | | item | Object | {} | 组件字段 | | currentLinkDataFieldId | String | "" | 当前触发的字段 | | formData | Object | {} | 当前表单的值 |

返回值Promise

请求示例

可以仅传递部分请求参数。

import { handleLinkDataLogic } from "baiyingutil";


function test(){
    handleLinkDataLogic(item, fieldId, formModel).then(data => {
      startLinkage(item, fd, data, linkFunc)
    }).catch(err=>{
    })
}

- 注意事项

💡 如果用户的用户信息不存在,将会使用请求的数据创建一个新的用户信息。