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

@baidu-map/bns

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@baidu-map/bns

Node.js n-api bns cpp addon

  • 1.2.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

nodejs napi bns addon

迁移自node-bns,具体干啥的

安装

npm install @baidu/bns 

备注:

  1. 注意目前仅支持公司开发机linux环境运行
  2. 需要使用厂内重新编译后的Nodejs版本,官网直接下载不能使用此扩展

开发build

sh deps.sh ##待完善,依赖安装 bcloud
npm run build

测试

npm run test

这次迁移开发有一下特点

  • node v12版本支持,使用 napi,理论对后续 node 版本也可兼容
  • 使用prebuildify,安装时候自动检查跳过编译也不会从网络下载,开发生产环境直接使用编译好的扩展
  • get_instance_by_service_asyncget_service_conf_async 方法返回 promise,对于 node12版本可以直接 await执行,不再使用回调方法

注意项

  • get_instance_by_service_async 会 reject, get_service_conf_async也有 reject
  • get_instance_list 这个方法注意下,貌似一直不可用,如有有线上用到请联系

todo

  • benchmark

欢迎大家一起参与 nodejs addon 生态开发

Keywords

FAQs

Package last updated on 12 Mar 2024

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