Format UPC to UPCE,UPCA,LongUPC for React Native App
npm install react-native-formatupcliuFormat UPC to UPCE,UPCA,LongUPC for React Native App
``bash`
npm install react-native-formatupcliu --save
react-native link react-native-formatupcliu
import it into your code
`js`
import { formatUPC } from 'react-native-formatupcliu';
formatUPC(source: string): Promise
> format UPC string to UPCE,UPCA,LongUPC array
Example
`js
const upc = '0111111111117';
formatUPC(upc).then((formattedUPCArr) => {
console.log(...formattedUPCArr);
}).catch((error) => {
console.log(error);
});
``