Socket
Book a DemoInstallSign in
Socket

@curong/function

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@curong/function

`@curong/function` 主要包含以下的方法:

0.5.0
latest
Source
npmnpm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

@curong/function

@curong/function 主要包含以下的方法:

  • before: 在执行某一个函数之前,先执行一个其他函数
  • cancelExec: 随时取消对 Promise、同步函数或异步函数的执行
  • collectItems: 收集 Promise,返回收集的 Promise 数组的结果
  • curring: 把接受多个参数的函数变成接受任意多个参数的函数,并且返回接受余下的参数的新函数
  • noCatch: 获取函数返回的值,并忽略抛出的错误
  • reach: 当函数执行到达指定次数后执行回调函数
  • sleepAsync: 异步阻塞一段时间
  • sleepRun: 等待一段时间后执行一个同步或异步的函数
  • sleepSync: 同步阻塞一段时间
  • timeoutCallback: 执行一个函数,并获取函数的返回值,如果函数的执行时间超过 duration 时,就执行回调函数
  • timeoutThrow: 执行一个函数,并获取函数的返回值。如果函数的执行时间超过 duration 时,就会抛出异常
  • tryCatch: try...catch... 语法的 Promise 包装

包括以下类型:

  • ClassInstanceKeys: 类的实例方法名的类型数组

FAQs

Package last updated on 13 Sep 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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.