Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@mpxjs/api-proxy

Package Overview
Dependencies
Maintainers
3
Versions
168
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mpxjs/api-proxy - npm Package Compare versions

Comparing version 2.0.15 to 2.0.16

src/.DS_Store

5

package.json
{
"name": "@mpxjs/api-proxy",
"version": "2.0.15",
"version": "2.0.16",
"description": "convert miniprogram API at each end",

@@ -29,4 +29,3 @@ "module": "src/index.js",

},
"homepage": "https://github.com/didi/mpx#readme",
"gitHead": "6af7968f36327428f8efff361355c2b54ad789b9"
"homepage": "https://github.com/didi/mpx#readme"
}

13

src/proxy-all.js

@@ -7,7 +7,14 @@ import { getEnvObj } from './utils'

const list = promisify(envObj, usePromise, whiteList)
const platforms = ['wx', 'ali', 'swan', 'qq', 'tt']
Object.keys(list).forEach(key => {
Object.keys(list).forEach(api => {
try {
target[key] = list[key]
} catch (e) {}
target[api] = (...args) => {
const platform = args.pop()
if (typeof platform !== 'string' || !~platforms.indexOf(platform)) {
args.push(platform)
}
return list[api].apply(target, args)
}
} catch (e) {} // 支付宝不支持重写 call 方法
})

@@ -14,0 +21,0 @@ }

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc