
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
apipost-tools
Advanced tools
apipost-tools 是一个一致性、模块化、高性能的 JavaScript 实用工具库。
npm i apipost-tools
需引入:
import ATools from 'apipost-tools';
let json='{"name":"我是一名ApiPost用户"}';
let email='1030698842@qq.com';
ATools.isJson(json); //true
ATools.isEmail(email); //true
目前支持:
array2Tree //扁平数据转树状结构
beautifyRaw // 美化数据,目前支持object,xml,html,jsonp,javascript. 返回结果为对象。包含mode(类型),value(美化后的结果)
formatXml //格式化xml数据
getUrlQuery //获取url中的query数据(对象)。
getUrlQueryArray //获取url中的query数据(数组)。
isEmail //验证邮箱格式
isXml // 验证是否为xml格式
isJson //验证是否为json格式
isJson5 //验证是否为json5格式
isJsonp //验证是否为jsonp格式
isHtml //验证是否为html格式
ms2second //毫秒时间戳转秒时间戳
formatHtml // 格式化html数据
jsonp2Obj // jsonp格式转为对象
errorResult // 统一失败结果对象
successResult // 统一成功结果对象
bufferToRaw // buffer转raw
completionHttpProtocol // 补齐http协议开头
NewURL // 根据url生成url对象
setObjValByPath // 根据对象路径给对象赋值,例如a.b.c 没有的属性会默认补上对象。
apipost-tools 遵循 MIT 协议。
FAQs
apipost-tools
We found that apipost-tools demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?

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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.