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

convert miniprogram API at each end

  • 1.0.4
  • npm
  • Socket score

Version published
Weekly downloads
156
increased by333.33%
Maintainers
3
Weekly downloads
 
Created
Source

mpx-api-proxy

convert API at each end 各个平台之间 api 进行转换

Usage

// 使用 mpx 生态

import mpx from '@mpxjs/core'
import apiProxy from '@mpxjs/api-proxy'

mpx.use(apiProxy, options)
// 单独使用
import apiProxy from '@mpxjs/api-proxy'

apiProxy(target, options) // target 为要抹平的对象

Options

参数名称类型含义是否必填默认值备注
usePromiseBoolean是否将 api 转化为 promise 格式使用false-
whiteListArray将 api 转化为 promise 格式时的白名单[]需要 usePromise 设为 true
platformObject各平台之间的转换{from:'', to:'' }使用 mpx 脚手架配置会自动进行转换,无需配置

Done

  • 微信 → 支付宝

Keywords

FAQs

Package last updated on 17 Apr 2019

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

  • 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