Socket
Socket
Sign inDemoInstall

idmp

Package Overview
Dependencies
0
Maintainers
1
Versions
86
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.7.1 to 1.7.2

2

package.json
{
"name": "idmp",
"version": "1.7.1",
"version": "1.7.2",
"keywords": [

@@ -5,0 +5,0 @@ "cache response",

@@ -27,3 +27,3 @@ # idmp

// Only this line changed
// Only one line need to change
export const getInfoIdmp = () => idmp('/api/your-info', getInfo)

@@ -48,11 +48,11 @@

// 处理有入参的场景
// Handle params
export const getInfoByIdIdmp = (id: string) =>
idmp(`/api/your-info?${id}`, () => getInfoById(id))
// 或者更通用的类型体操写法,用于复杂的入参,idmp 会自动推导返回值类型,与原函数保持一致
// Or a more generic type juggling, for complex params, idmp will infer the return type automatically, keep it consistent with the original function
export const getInfoByIdIdmp = (...args: Parameters<typeof getInfoById>) =>
idmp(`/api/your-info?${JSON.stringify(args)}`, () => getInfoById(...args))
// 增加更多配置项
// More options
export const getInfoByIdIdmp = (id: string) =>

@@ -59,0 +59,0 @@ idmp(`/api/your-info?${id}`, () => getInfoById(id), {

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