@ericblade/quagga2 1.7.0 → 1.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -23,7 +23,15 @@ node functionality.
23
23
 
24
24
  ## Using React / Redux?
25
25
 
26
- Please see also https://github.com/ericblade/quagga2-react-example/ and https://github.com/ericblade/quagga2-redux-middleware/
26
+ Please see also <https://github.com/ericblade/quagga2-react-example/> and <https://github.com/ericblade/quagga2-redux-middleware/>
27
+
28
+ ## Using Angular?
29
+
30
+ Please see <https://github.com/julienboulay/ngx-barcode-scanner> or <https://github.com/classycodeoss/mobile-scanning-demo>
31
+
32
+ ## Using ThingWorx?
33
+
34
+ Please see <https://github.com/ptc-iot-sharing/ThingworxBarcodeScannerWidget>
27
35
 
28
36
  ## What is QuaggaJS?
29
37
 
@@ -54,6 +62,7 @@ be aligned with the viewport.
54
62
 
55
63
  Quagga makes use of many modern Web-APIs which are not implemented by all
56
64
  browsers yet. There are two modes in which Quagga operates:
65
+
57
66
  1. analyzing static images and
58
67
  2. using a camera to decode the images from a live-stream.
59
68
 
@@ -66,6 +75,7 @@ of the used Web-APIs for each mode:
66
75
  ### Static Images
67
76
 
68
77
  The following APIs need to be implemented in your browser:
78
+
69
79
  - [webworkers](http://caniuse.com/#feat=webworkers)
70
80
  - [canvas](http://caniuse.com/#feat=canvas)
71
81
  - [typedarrays](http://caniuse.com/#feat=typedarrays)
@@ -75,6 +85,7 @@ The following APIs need to be implemented in your browser:
75
85
  ### Live Stream
76
86
 
77
87
  In addition to the APIs mentioned above:
88
+
78
89
  - [MediaDevices](http://caniuse.com/#feat=stream)
79
90
 
80
91
  __Important:__ Accessing `getUserMedia` requires a secure origin in most
@@ -149,14 +160,19 @@ You can also build the library yourself and copy `quagga.js` file from the `dist
149
160
  You can include the following script tags with CDN links:
150
161
 
151
162
  a) `quagga.js`
163
+
152
164
  ```html
153
165
  <script src="https://cdn.jsdelivr.net/npm/@ericblade/quagga2/dist/quagga.js"></script>
154
166
  ```
167
+
155
168
  b) `quagga.min.js` (minified version)
169
+
156
170
  ```html
157
171
  <script src="https://cdn.jsdelivr.net/npm/@ericblade/quagga2/dist/quagga.min.js"></script>
158
172
  ```
173
+
159
174
  *Note: You can include a specific version of the library by including the version as shown below.*
175
+
160
176
  ```html
161
177
  <!-- Link for Version 1.2.6 -->
162
178
  <script src="https://cdn.jsdelivr.net/npm/@ericblade/quagga2@1.2.6/dist/quagga.js"></script>
@@ -222,10 +238,13 @@ quagga, then you can run from the quagga directory:
222
238
  ```
223
239
  npm install && npm run build && npm link
224
240
  ```
241
+
225
242
  then from the other project directory that needs this quagga, do
243
+
226
244
  ```
227
245
  npm link @ericblade/quagga2
228
246
  ```
247
+
229
248
  When linking is successful, all future runs of 'npm run build' will update the version that is
230
249
  linked in the project. When combined with an application using webpack-dev-server or some other
231
250
  hot-reload system, you can do very rapid iteration this way.
@@ -588,7 +607,6 @@ values which worked best during development.
588
607
  Only two properties are relevant for the use in Quagga (`halfSample` and
589
608
  `patchSize`) whereas the rest is only needed for development and debugging.
590
609
 
591
-
592
610
  ```javascript
593
611
  {
594
612
  halfSample: true,
@@ -630,7 +648,7 @@ recommended to crank up the resolution in order to find a barcode.
630
648
  ## Examples
631
649
 
632
650
  The following example takes an image `src` as input and prints the result on the
633
- console. The decoder is configured to detect _Code128_ barcodes and enables the
651
+ console. The decoder is configured to detect *Code128* barcodes and enables the
634
652
  locating-mechanism for more robust results.
635
653
 
636
654
  ```javascript
@@ -760,7 +778,7 @@ If you add a new test file, you should also make sure to import it in either cyp
760
778
  ## Image Debugging
761
779
 
762
780
  In case you want to take a deeper dive into the inner workings of Quagga, get to
763
- know the _debugging_ capabilities of the current implementation. The various
781
+ know the *debugging* capabilities of the current implementation. The various
764
782
  flags exposed through the `config` object give you the ability to visualize
765
783
  almost every step in the processing. Because of the introduction of the
766
784
  web-workers, and their restriction not to have access to the DOM, the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ericblade/quagga2",
3
- "version": "1.7.0",
3
+ "version": "1.7.1",
4
4
  "description": "An advanced barcode-scanner written in JavaScript",
5
5
  "main": "lib/quagga.js",
6
6
  "types": "type-definitions/quagga.d.ts",
@@ -132,7 +132,8 @@
132
132
  "Tony Brix <tony@brix.ninja>",
133
133
  "Alex Howes <alex@alexhowes.co.uk>",
134
134
  "Sudham Jayanthi <workwithsudham@gmail.com>",
135
- "Ben Khoo <khoobks@gmail.com>"
135
+ "Ben Khoo <khoobks@gmail.com>",
136
+ "Andy Edinborough <andy@edinborough.org>"
136
137
  ],
137
138
  "license": "MIT",
138
139
  "engines": {
package/tsconfig.json CHANGED
@@ -13,6 +13,7 @@
13
13
  ] /* Specify library files to be included in the compilation. */,
14
14
  "types": [
15
15
  "mocha",
16
+ "node"
16
17
  ] /* Type declaration files to be included in compilation. */,
17
18
  "module": "esNext" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
18
19
  "moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */,
@@ -753,7 +753,7 @@ export interface QuaggaJSConfigObject {
753
753
  * Ex: '/test/fixtures/code_128/image-001.jpg'
754
754
  * or: 'data:image/jpg;base64,' + data
755
755
  */
756
- src?: string;
756
+ src?: string | Uint8Array | Buffer;
757
757
 
758
758
  inputStream?: {
759
759
  /**
@@ -801,6 +801,8 @@ export interface QuaggaJSConfigObject {
801
801
  bottom?: string;
802
802
  };
803
803
 
804
+ mime?: string;
805
+
804
806
  singleChannel?: boolean;
805
807
  size?: number;
806
808
  sequence?: boolean;