Socket
Socket
Sign inDemoInstall

@hecom/constantgroup

Package Overview
Dependencies
1
Maintainers
3
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @hecom/constantgroup

Constant Group Management


Version published
Maintainers
3
Created

Readme

Source

ConstantGroup

npm version Build Status

这是选项值集的管理模块,原始数据是平铺列表,需要经过转换生成一个树状结构。

安装

npm install --save @hecom/constantgroup

使用方法

import ConstantGroup from '@hecom/constantgroup';

接口

  • load: (constantId) => Promise<object>:强制加载指定constantId的选项值集,返回Promise包含生成的选项值集树。
  • loadIfInvalid: (constantId) => Promise<object>:如果不存在已有的选项值集,则调用load强制加载,否则直接返回包含数据的Promise。
  • get: (constantId) => object:获取指定constantId的选项值集树。
  • isValid: (constantId) => boolean:判断指定constantId的选项值集在缓存中是否存在。

FAQs

Last updated on 24 Oct 2023

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc