@fttx/barcode-scanner
Advanced tools
Comparing version 1.0.4 to 4.12.2
@@ -50,3 +50,3 @@ import { IonicNativePlugin } from '@ionic-native/core'; | ||
export interface BarcodeScanResult { | ||
format: 'QR_CODE' | 'DATA_MATRIX' | 'UPC_E' | 'UPC_A' | 'EAN_8' | 'EAN_13' | 'CODE_128' | 'CODE_39' | 'CODE_93' | 'CODABAR' | 'ITF' | 'RSS14' | 'RSS_EXPANDED' | 'PDF417' | 'AZTEC' | 'MSI'; | ||
format: 'QR_CODE' | 'DATA_MATRIX' | 'UPC_E' | 'UPC_A' | 'EAN_8' | 'EAN_13' | 'CODE_128' | 'CODE_39' | 'CODE_93' | 'CODABAR' | 'ITF' | 'RSS14' | 'RSS_EXPANDED' | 'PDF_417' | 'AZTEC' | 'MSI'; | ||
cancelled: boolean; | ||
@@ -71,6 +71,6 @@ text: string; | ||
* | ||
* this.barcodeScanner.scan().then((barcodeData) => { | ||
* // Success! Barcode data is here | ||
* }, (err) => { | ||
* // An error occurred | ||
* this.barcodeScanner.scan().then(barcodeData => { | ||
* console.log('Barcode data', barcodeData); | ||
* }).catch(err => { | ||
* console.log('Error', err); | ||
* }); | ||
@@ -91,4 +91,4 @@ * ``` | ||
* Open the barcode scanner. | ||
* @param options {BarcodeScannerOptions} Optional options to pass to the scanner | ||
* @returns {Observable<any>} Returns a Promise that resolves with scanner data, or rejects with an error. | ||
* @param {BarcodeScannerOptions} [options] Optional options to pass to the scanner | ||
* @returns {Observable<any>} Returns an Observable that resolves with scanner data, or rejects with an error. | ||
*/ | ||
@@ -99,4 +99,4 @@ scan(options?: BarcodeScannerOptions): Observable<BarcodeScanResult>; | ||
* NOTE: not well supported on Android | ||
* @param type {string} Type of encoding | ||
* @param data {any} Data to encode | ||
* @param {string} type Type of encoding | ||
* @param {any} data Data to encode | ||
* @returns {Promise<any>} | ||
@@ -103,0 +103,0 @@ */ |
26
index.js
@@ -21,3 +21,3 @@ var __extends = (this && this.__extends) || (function () { | ||
import { Injectable } from '@angular/core'; | ||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core'; | ||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core'; | ||
import { Observable } from 'rxjs/Observable'; | ||
@@ -40,6 +40,6 @@ /** | ||
* | ||
* this.barcodeScanner.scan().then((barcodeData) => { | ||
* // Success! Barcode data is here | ||
* }, (err) => { | ||
* // An error occurred | ||
* this.barcodeScanner.scan().then(barcodeData => { | ||
* console.log('Barcode data', barcodeData); | ||
* }).catch(err => { | ||
* console.log('Error', err); | ||
* }); | ||
@@ -65,14 +65,18 @@ * ``` | ||
* Open the barcode scanner. | ||
* @param options {BarcodeScannerOptions} Optional options to pass to the scanner | ||
* @returns {Observable<any>} Returns a Promise that resolves with scanner data, or rejects with an error. | ||
* @param {BarcodeScannerOptions} [options] Optional options to pass to the scanner | ||
* @returns {Observable<any>} Returns an Observable that resolves with scanner data, or rejects with an error. | ||
*/ | ||
BarcodeScanner.prototype.scan = function (options) { return; }; | ||
BarcodeScanner.prototype.scan = function (options) { | ||
return; | ||
}; | ||
/** | ||
* Encodes data into a barcode. | ||
* NOTE: not well supported on Android | ||
* @param type {string} Type of encoding | ||
* @param data {any} Data to encode | ||
* @param {string} type Type of encoding | ||
* @param {any} data Data to encode | ||
* @returns {Promise<any>} | ||
*/ | ||
BarcodeScanner.prototype.encode = function (type, data) { return; }; | ||
BarcodeScanner.prototype.encode = function (type, data) { | ||
return; | ||
}; | ||
BarcodeScanner.decorators = [ | ||
@@ -79,0 +83,0 @@ { type: Injectable }, |
{ | ||
"name": "@fttx/barcode-scanner", | ||
"version": "1.0.4", | ||
"main": "index.js", | ||
"version": "4.12.2", | ||
"description": "Ionic Native - Native plugins for ionic apps", | ||
"module": "index.js", | ||
"typings": "index.d.ts", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
"author": "ionic", | ||
"license": "MIT", | ||
"peerDependencies": { | ||
"@ionic-native/core": "^4.11.0", | ||
"@angular/core": "*", | ||
"rxjs": "^5.5.11" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/fttx/ionic-native.git" | ||
}, | ||
"author": "", | ||
"license": "ISC", | ||
"bugs": { | ||
"url": "https://github.com/fttx/ionic-native/issues" | ||
}, | ||
"homepage": "https://github.com/fttx/ionic-native#readme", | ||
"description": "", | ||
"peerDependencies": { | ||
"@ionic-native/core": "^4.2.0", | ||
"@angular/core": "*", | ||
"rxjs": "^5.0.1" | ||
"url": "https://github.com/ionic-team/ionic-native.git" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
15811
211