@cqmbr/bridge

bridge of native and web

Stats

StarsIssuesVersionUpdatedCreatedSize
@cqmbr/bridge
001.1.03 years ago3 years agoMinified + gzip package size for @cqmbr/bridge in KB

Readme

Bridge

Bridge of native and web

node npm license Build Status Standard - JavaScript Style Guide Coverage Status

Installation

npm i @cqmbr/bridge

Use

import Bridge from '@cqmbr/bridge'

const bridge = new Bridge('namespace')

bridge.call(func, args)

bridge.addEventListener(event, handler)

bridge.removeEventListener(event, handler)

API

  • bridge.call(funcName: string, args: any): call native function with args

  • bridge.addEventListener(event: string, handler: function): add event listener

  • bridge.removeEventListener(event: string, handler: function): remove event listener

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.