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

wink-eng-lite-web-model

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wink-eng-lite-web-model - npm Package Compare versions

Comparing version 1.3.3 to 1.4.0

7

CHANGELOG.md

@@ -0,1 +1,8 @@

# [Detects unsupported Node.js & Browsers and their versions](https://github.com/winkjs/wink-eng-lite-web-model/releases/tag/1.4.0)
## Version 1.4.0 March 24, 2022
### ✨ Features
- While loading, it automatically detects unsupported Node.js & Browsers and their versions. 😎 🙌 😇
# [Making it more browser friendly](https://github.com/winkjs/wink-eng-lite-web-model/releases/tag/1.3.3)

@@ -2,0 +9,0 @@ ## Version 1.3.3 February 08, 2022

2

dist/read-core-model.js

@@ -1,1 +0,1 @@

const originalModel=require("./languages/cur/models/eng-core-web-model.json"),bufferFromBase64=function(data){const decodedData=atob(data);var size=decodedData.length,bytes=new Uint8Array(size);for(let k=0;k<size;k+=1)bytes[k]=decodedData.charCodeAt(k);return bytes.buffer};var readModel=function(){const model=JSON.parse(JSON.stringify(originalModel));var packing=model.packing,featuresData=model.features,pos=model.pos;model.lexicon=new Uint32Array(bufferFromBase64(model.lexicon)),model.xpansions=new Uint32Array(bufferFromBase64(model.xpansions));for(const f in model.packing.layout)if(0===packing.layout[f][3]){featuresData[f].hash=Object.create(null);for(let k=0;k<featuresData[f].list.length;k+=1)featuresData[f].hash[featuresData[f].list[k]]=k}featuresData.lexeme.hash=Object.create(null);for(let k=0;k<featuresData.lexeme.list.length;k+=1)featuresData.lexeme.hash[featuresData.lexeme.list[k]]=k;const clusters=featuresData.posClusters.list;for(let k=0;k<clusters.length;k+=1)clusters[k]=new Set(clusters[k].split("_").map((e=>pos.hash[e]||0)));return model};module.exports=readModel;
const originalModel=require("./languages/cur/models/eng-core-web-model.json"),bufferFromBase64=function(data){let decodedData;try{decodedData=atob(data)}catch(e){throw Error("Unsupproted browser or node.js version;\n Refer to https://developer.mozilla.org/en-US/docs/Web/API/atob#browser_compatibility for supported versions.")}var size=decodedData.length,bytes=new Uint8Array(size);for(let k=0;k<size;k+=1)bytes[k]=decodedData.charCodeAt(k);return bytes.buffer};var readModel=function(){const model=JSON.parse(JSON.stringify(originalModel));var packing=model.packing,featuresData=model.features,pos=model.pos;model.lexicon=new Uint32Array(bufferFromBase64(model.lexicon)),model.xpansions=new Uint32Array(bufferFromBase64(model.xpansions));for(const f in model.packing.layout)if(0===packing.layout[f][3]){featuresData[f].hash=Object.create(null);for(let k=0;k<featuresData[f].list.length;k+=1)featuresData[f].hash[featuresData[f].list[k]]=k}featuresData.lexeme.hash=Object.create(null);for(let k=0;k<featuresData.lexeme.list.length;k+=1)featuresData.lexeme.hash[featuresData.lexeme.list[k]]=k;const clusters=featuresData.posClusters.list;for(let k=0;k<clusters.length;k+=1)clusters[k]=new Set(clusters[k].split("_").map((e=>pos.hash[e]||0)));return model};module.exports=readModel;
{
"name": "wink-eng-lite-web-model",
"version": "1.3.3",
"version": "1.4.0",
"description": "Wink's English Language Light Web Model for Web Browsers",

@@ -5,0 +5,0 @@ "keywords": [

@@ -27,2 +27,3 @@ # wink-eng-lite-web-model

## Getting Started
It supports Node.js `version 16.0.0` or above. The compatible browsers are listed [here](https://developer.mozilla.org/en-US/docs/Web/API/atob#browser_compatibility).

@@ -29,0 +30,0 @@ ### Installation

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