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

tesseract.js-utils

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tesseract.js-utils - npm Package Compare versions

Comparing version 1.0.0-beta.5 to 1.0.0-beta.6

20

package.json
{
"name": "tesseract.js-utils",
"version": "1.0.0-beta.5",
"version": "1.0.0-beta.6",
"description": "Utilities for tesseract.js",
"main": "src/index.node.js",
"scripts": {
"test:server": "node tests/scripts/server.js",
"test:node": "mocha --exit --bail --require ./tests/scripts/test-helper.js tests/*.test.js",
"test:browser": "testcafe chrome tests/browser/**/*.test.js",
"start": "node ./scripts/server.js",
"wait": "wait-on http://localhost:3000/package.json",
"test": "npm-run-all -p -r start test:all",
"test:all": "npm-run-all wait test:browser:* test:node",
"test:node": "mocha --exit --bail --require ./scripts/test-helper.js tests/*.test.js",
"test:browser-tpl": "mocha-headless-chrome -a incognito -a no-sandbox -a disable-setuid-sandbox -t 300000",
"test:browser:load-lang": "npm run test:browser-tpl -- -f ./tests/loadLang.test.html",
"test:browser:read-image": "npm run test:browser-tpl -- -f ./tests/readImage.test.html",
"lint": "eslint ."

@@ -35,2 +40,3 @@ },

"devDependencies": {
"cors": "^2.8.5",
"eslint": "^5.9.0",

@@ -46,4 +52,6 @@ "eslint-config-airbnb": "^17.1.0",

"mocha": "^5.2.0",
"mocha-headless-chrome": "^2.0.2",
"npm-run-all": "^4.1.5",
"tesseract.js-core": "^2.0.0-beta.5",
"testcafe": "^0.23.2",
"wait-on": "^3.2.0",
"webpack": "^4.25.1",

@@ -53,2 +61,3 @@ "webpack-dev-middleware": "^3.4.0"

"dependencies": {
"axios": "^0.18.0",
"bmp-js": "^0.1.0",

@@ -58,3 +67,2 @@ "file-type": "^10.5.0",

"is-url": "^1.2.4",
"node-fetch": "^2.3.0",
"resolve-url": "^0.2.1",

@@ -61,0 +69,0 @@ "zlibjs": "^0.3.1"

@@ -5,3 +5,2 @@ const cache = require('./common/browser/cache');

loadLang: require('./loadLang')({
fetch: require('./common/browser/fetch'),
gunzip: require('./common/browser/gunzip'),

@@ -8,0 +7,0 @@ resolveURL: require('resolve-url'),

@@ -5,3 +5,2 @@ const cache = require('./common/node/cache');

loadLang: require('./loadLang')({
fetch: require('./common/node/fetch'),
gunzip: require('./common/node/gunzip'),

@@ -8,0 +7,0 @@ ...cache,

const isURL = require('is-url');
const axios = require('axios');

@@ -50,5 +51,6 @@ const handleLang = modules => ({

const fetchTrainedData = iLangPath => (
modules.fetch(`${iLangPath}/${lang}.traineddata.gz`)
.then(resp => resp.arrayBuffer())
.then(buf => modules.gunzip(new Uint8Array(buf)))
axios.get(`${iLangPath}/${lang}.traineddata.gz`, {
responseType: 'arraybuffer',
})
.then(resp => modules.gunzip(new Uint8Array(resp.data)))
.then(handleLang(modules)({

@@ -55,0 +57,0 @@ cachePath, cacheMethod, lang, ...options,

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