Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
physikey-kit-react-native
Advanced tools
**This package is a wrapper for [react-native-nfc-manager](https://github.com/revtel/react-native-nfc-manager), which streamlines and enhances common NFC read and write tasks with additional UI enhancements.**
This package is a wrapper for react-native-nfc-manager, which streamlines and enhances common NFC read and write tasks with additional UI enhancements.
A React Native package that simplifies writing and reading data to and from NFC tags using react-native-nfc-manager. This package also provides an optional scan modal component for Android devices to enhance the user experience during NFC scanning.
npm install physikey-kit-react-native
# or
yarn add physikey-kit-react-native
npm install react-native-nfc-manager react-native-gzip
# or
yarn add react-native-nfc-manager react-native-gzip
Use writeToCard to write an array of strings to an NFC tag. The function returns a promise that resolves to an object containing the status (success) and a message.
import { writeToCard } from 'physikey-kit-react-native';
const textList = ['Hello', 'World'];
const writeTextToCard = async () => {
try {
const result = await writeToCard(textList);
if (result.success) {
console.log('Write successful:', result.message);
} else {
console.log('Write failed:', result.message);
}
} catch (error) {
console.error('An error occurred:', error.message);
}
}
writeTextToCard();
Use readFromCard to read data from an NFC tag. The function returns a promise that resolves to an object containing the success status and the read contents as a list of strings (or an error message if unsuccessful).
import { readFromCard } from 'physikey-kit-react-native';
const readTextFromCard = async () => {
try {
const result = await readFromCard();
if (result.success) {
console.log('Read successful:', result.message);
} else {
console.log('Read failed:', result.message);
}
} catch (error) {
console.error('An error occurred:', error.message);
}
};
readTextFromCard();
This project is licensed under the ISC License.
FAQs
**This package is a wrapper for [react-native-nfc-manager](https://github.com/revtel/react-native-nfc-manager), which streamlines and enhances common NFC read and write tasks with additional UI enhancements.**
The npm package physikey-kit-react-native receives a total of 5 weekly downloads. As such, physikey-kit-react-native popularity was classified as not popular.
We found that physikey-kit-react-native demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.