
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
react-native-barcodes-detector
Advanced tools
Detect barcodes from static images in React Native using Google ML Kit.
Detect different barcodes in static images directly on React Native. This library has a TypeScript-first support and uses Google ML Kit under the hood 🤖.
The supported barcodes are:
# Install
npm install react-native-barcodes-detector
# Link
cd ios && pod install
Take a look at the example to see a use-case with react-native-image-picker (it's really short, I promise 🙏).
Anyway, this is the tl;dr:
import { detectBarcodes, BarcodeFormat } from "react-native-barcodes-detector";
// This is the local image url usually retrieved
// through libraries like `react-native-image-picker`.
const imageUrl = "file://..."
// The `detectBarcodes` function needs the image url and
// a list of formats to detect. Using an empty array all
// the supported formats will be used making the detection
// process slower 🐌.
const formats = [BarcodeFormat.QR_CODE]
detectBarcodes(imageUrl, formats)
.then(barcodes => {
// Here `barcodes` will contain a list
// of detected barcodes.
})
This library uses Google ML Kit to recognize barcodes, and this process is completely done on the physical device.
For a Data Matrix to be recognized it must intersect the center of the image, as stated here. This means that only one Data Matrix code can be recognized per image.
React Native Barcodes Detector is under the MIT license.
FAQs
Detect barcodes from static images in React Native using Google ML Kit.
The npm package react-native-barcodes-detector receives a total of 33 weekly downloads. As such, react-native-barcodes-detector popularity was classified as not popular.
We found that react-native-barcodes-detector demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.