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

@regulaforensics/document-reader-webclient

Package Overview
Dependencies
Maintainers
0
Versions
215
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@regulaforensics/document-reader-webclient

Regula Document Reader js client for the browser and node.js based on axios

  • 7.5.88-nightly
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.2K
decreased by-6.63%
Maintainers
0
Weekly downloads
 
Created
Source

Regula Document Reader js client for the browser and node.js based on axios

npm version npm type definitions documentation OpenAPI live

Documents recognition as easy as reading two bytes.

If you have any problems with or questions about this client, please contact us through a GitHub issue. You are invited to contribute new features, fixes, or updates, large or small. We are always thrilled to receive pull requests, and do our best to process them as fast as we can. See dev guide

Install package

npm install @regulaforensics/document-reader-webclient

Basic Example

Performing request:

import { DocumentReaderApi, Scenario, TextFieldType, GraphicFieldType } from '@regulaforensics/document-reader-webclient';
const { DOCUMENT_NUMBER, SURNAME_AND_GIVEN_NAMES, DATE_OF_BIRTH } = TextFieldType;
const { PORTRAIT, SIGNATURE } = GraphicFieldType;

const imageAsBase64String = getDocImageAsBase64String();
const api = new DocumentReaderApi({ basePath: 'http://localhost:8080' });
const result = await api.process({ images: [documentImage], processParam: { scenario: Scenario.FULL_PROCESS} });

Parsing results:

// text fields
const docNumber = result.text?.getField(DOCUMENT_NUMBER);
const fullName = result.text?.getField(SURNAME_AND_GIVEN_NAMES);
const dateOfBirth = result.text?.getField(DATE_OF_BIRTH);

// graphics fields
const portraitAsBase64 = result.images?.getField(PORTRAIT);
const signatureAsBase64 = result.images?.getField(SIGNATURE);

Compatibility

Language level

  • ES5 with some ES6 features [Promise] and whatwg URL. If your environment doesn't support ES6 required features, you can polyfill.
  • nodejs 18+

Module system

  • CommonJS
  • ES6 module system

Definitions

  • TypeScript's definitions should be automatically resolved via package.json. (Reference)

Keywords

FAQs

Package last updated on 28 Aug 2024

Did you know?

Socket

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.

Install

Related posts

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