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

typo-js

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

typo-js - npm Package Compare versions

Comparing version 1.2.2 to 1.2.3

2

package.json
{
"name": "typo-js",
"version": "1.2.2",
"version": "1.2.3",
"description": "A Hunspell-style spellchecker.",

@@ -5,0 +5,0 @@ "main": "typo.js",

@@ -787,26 +787,37 @@ /* globals chrome: false */

var self = this;
self.alphabet = "abcdefghijklmnopqrstuvwxyz";
/*
if (!self.alphabet) {
// Use the alphabet as implicitly defined by the words in the dictionary.
var alphaHash = {};
if (!this.alphabet) {
// Use the English alphabet as the default. Problematic, but backwards-compatible.
this.alphabet = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
for (var i in self.dictionaryTable) {
for (var j = 0, _len = i.length; j < _len; j++) {
alphaHash[i[j]] = true;
}
// Any characters defined in the affix file as substitutions can go in the alphabet too.
// Note that dictionaries do not include the entire alphabet in the TRY flag when it's there.
// For example, Q is not in the default English TRY list; that's why having the default
// alphabet above is useful.
if ( 'TRY' in this.flags ) {
this.alphabet += this.flags['TRY'];
}
for (var i in alphaHash) {
self.alphabet += i;
// Plus any additional characters specifically defined as being allowed in words.
if ( 'WORDCHARS' in this.flags ) {
this.alphabet += this.flags['WORDCHARS'];
}
var alphaArray = self.alphabet.split("");
// Remove any duplicates.
var alphaArray = this.alphabet.split("");
alphaArray.sort();
self.alphabet = alphaArray.join("");
var alphaHash = {};
for ( var i = 0; i < alphaArray.length; i++ ) {
alphaHash[ alphaArray[i] ] = true;
}
this.alphabet = '';
for ( var i in alphaHash ) {
this.alphabet += i;
}
}
*/
var self = this;
/**

@@ -813,0 +824,0 @@ * Returns a hash keyed by all of the strings that can be made by making a single edit to the word (or words in) `words`

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