New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@arlenwang/react-native-local-barcode-recognizer

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@arlenwang/react-native-local-barcode-recognizer

React Native 从本地图像识别条形码的插件

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

React native 本地二维码识别器

react-native-local-barcode-recognizer

安装:

#install:
npm install git+https://github.com/du6688/react-native-local-barcode-recognizer.git

#and link:
react-native link react-native-local-barcode-recognizer

用法:

import LocalBarcodeRecognizer from 'react-native-local-barcode-recognizer';

const imageBase64 = "data:image/jpeg;base64,/9j/4AA.......";

let result = await LocalBarcodeRecognizer.decode(imageBase64.replace("data:image/jpeg;base64,",""), {
            codeTypes: ['ean13', 'qr']
        });

console.log(result);

说明:

修改源码文件,修复二维码识别率过低的问题,添加了ts类型

优化方法参照 文章

API

方法参数
decode(base64编码,options)=> Promise<string>

options

名称描述
codeTypes[aztec,ean13, ean8, qr, pdf417, upc_e, datamatrix, code39, code93, interleaved2of5, codabar, code128, maxicode, rss14, rssexpanded, upc_a, upc_ean]

Keywords

FAQs

Package last updated on 03 Jun 2022

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