
Security News
PodRocket Podcast: Inside the Recent npm Supply Chain Attacks
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
@equinor/react-native-mad-tag-ocr
Advanced tools
Mad Tag Optical Character Recognition (OCR) adds a camera component that recognizes and highlights text in real-time. The highlighted text can also be selected by the user. This is useful for tasks such as scanning tags on Equinor facilities, but can also be used to scan other types of text.
This library exports a component called OCRCamera
that you can import into your project. The
example below shows how it can be used.
import { OCRCamera } from "@equinor/react-native-mad-tag-ocr";
export const MyComponent = () => {
const { hasPermission, requestPermission } = useCameraPermission();
useFocusEffect(() => void requestPermission());
const onScanResult = (tag: string) => {
// do someting here
};
const onScanCancel = () => {
// do something here
};
return <OCRCamera onSelectTag={onScanResult} onClose={onScanCancel} />;
};
Remember to call the requestPermission
function from react-native-vision-camera
before using the
OCR camera. Also, if your project is using the React Navigation
package, you can call useFocusEffect
to make sure permission is requested every time you navigate
to the OCR camera. This ensures the user is always asked for permissions even if the user initially
clicked decline.
Note that the OCR camera only supports viewing in portrait mode.
This library has the following peer dependencies that you need to install in your project. Please refer to the documentation below for information on how to do this.
FAQs
A React Native library for scanning tags
The npm package @equinor/react-native-mad-tag-ocr receives a total of 22 weekly downloads. As such, @equinor/react-native-mad-tag-ocr popularity was classified as not popular.
We found that @equinor/react-native-mad-tag-ocr demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers 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.
Security News
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.