Exciting release!Introducing "safe npm". Learn more
Socket
Log inDemoInstall

@regulaforensics/document-reader-webclient

Package Overview
Dependencies
3
Maintainers
4
Versions
46
Issues
File Explorer

Advanced tools

@regulaforensics/document-reader-webclient

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

    6.7.1latest
    NPM

Version published
Maintainers
4
Weekly downloads
533
decreased by-6.98%

Weekly downloads

Readme

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

Example

Performing request:

import {DocumentReaderApi, 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: [imageAsBase64String]})

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 10+

Module system

  • CommonJS
  • ES6 module system

Definitions

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

Keywords

FAQs

Last updated on 20 Mar 2023

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket
support@socket.devSocket SOC 2 Logo

Product

  • Package Issues
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc