Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cordova-plugin-mobile-ocr

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cordova-plugin-mobile-ocr - npm Package Compare versions

Comparing version 2.0.1 to 3.0.0

2

package.json
{
"name": "cordova-plugin-mobile-ocr",
"version": "2.0.1",
"version": "3.0.0",
"repository": {

@@ -5,0 +5,0 @@ "type": "git",

|[Introduction](#cordova-plugin-mobile-ocr) | [Supported_Platforms](#supported-platforms) | [Installation_Steps](#installation-steps) | [Plugin_Usage](#plugin-usage) | [Working_Examples](#working-examples) | [More_about_us!](#more-about-us)|
|:---:|:------:|:---:|:---:|:---:|:---:|
> **BREAKING CHANGES** introduced in plugin version 2.0.0. Older version will run as expected!
> **BREAKING CHANGES** introduced in plugin version 2.0.0 and 3.0.0. Older version will run as expected!
> In 2.x.x `returnType` input was removed!
> In 3.x.x if no text was found in the image, the success callback will be called instead of the error callback along with a new key `foundText` with boolean value. Please see example objects at the very end for more explanation.
> **DOCUMENTATION** here applies only to plugin ver 3.x.x! The respective documentation of each of the versions is available with the npm release
# cordova-plugin-mobile-ocr

@@ -62,3 +66,3 @@

- **returnType**
> Note :- This input is no longer accepted from plugin version 2.0.0 and above. <br>
> Note :- This input is **no longer accepted** from plugin version 2.0.0 and above. <br>

@@ -177,2 +181,5 @@ The **`returnType`** parameter can take values 0,1,2 or 3 each of which are explained in detail in the table below. If a wrong value is passed into this parameter it will default to 3 or `ALL`. See the image below the table to get a better understanding of `BLOCKS`, `LINES` and `WORDS`. Each of these (`BLOCKS`, `LINES` or `WORDS`) will contain the entire recognized text but they can be used for better formatting and thus are separated. `ALL` will contain all blocks first, followed by a new line character `\n`, followed by all lines, followed by another new line character `\n`, followed by all words. So using `ALL` will return duplicates. `returnType` is an `Int` within the native code.

> **foundText** was added in plugin version 3.0.0 and above. In earlier plugin versions if image did not contain text the error callback was called. From 3.0.0 onwards all success callbacks will contain the `foundText` key with a boolean value. Letting the user know if a text was present in the image. if `foundText` is false, text was not found and hence the `blocks`, `lines`, `words` keys won't be returned
- **foundText** - **boolean** value that is true if image contains text else false
- **blocks**

@@ -232,5 +239,12 @@ - **blocktext** - **Array** that contains each text block

- width - Key
# Example Object when no text in image
```json
{
"foundText" : false
}
```
# iOS Example Object
```json
{
"foundText" : true,
"blocks": {

@@ -885,2 +899,3 @@ "blocklanguages": [

{
"foundText" : true,
"blocks": {

@@ -887,0 +902,0 @@ "blocktext": [

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc