Socket
Socket
Sign inDemoInstall

cspell-dictionary

Package Overview
Dependencies
Maintainers
1
Versions
114
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cspell-dictionary - npm Package Compare versions

Comparing version 6.22.0 to 6.23.0

dist/SpellingDictionary/createInlineSpellingDictionary.d.ts

2

dist/index.d.ts
export type { CachingDictionary, FindOptions, FindResult, HasOptions, SearchOptions, SpellingDictionary, SpellingDictionaryCollection, SpellingDictionaryOptions, SuggestionCollector, SuggestionResult, SuggestOptions, } from './SpellingDictionary';
export { createCachingDictionary, createCollection, createFailedToLoadDictionary, createFlagWordsDictionary, createForbiddenWordsDictionary, createIgnoreWordsDictionary, createSpellingDictionary, createSpellingDictionaryFromTrieFile, } from './SpellingDictionary';
export { createCachingDictionary, createCollection, createFailedToLoadDictionary, createFlagWordsDictionary, createForbiddenWordsDictionary, createIgnoreWordsDictionary, createInlineSpellingDictionary, createSpellingDictionary, createSpellingDictionaryFromTrieFile, } from './SpellingDictionary';
//# sourceMappingURL=index.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createSpellingDictionaryFromTrieFile = exports.createSpellingDictionary = exports.createIgnoreWordsDictionary = exports.createForbiddenWordsDictionary = exports.createFlagWordsDictionary = exports.createFailedToLoadDictionary = exports.createCollection = exports.createCachingDictionary = void 0;
exports.createSpellingDictionaryFromTrieFile = exports.createSpellingDictionary = exports.createInlineSpellingDictionary = exports.createIgnoreWordsDictionary = exports.createForbiddenWordsDictionary = exports.createFlagWordsDictionary = exports.createFailedToLoadDictionary = exports.createCollection = exports.createCachingDictionary = void 0;
var SpellingDictionary_1 = require("./SpellingDictionary");

@@ -11,4 +11,5 @@ Object.defineProperty(exports, "createCachingDictionary", { enumerable: true, get: function () { return SpellingDictionary_1.createCachingDictionary; } });

Object.defineProperty(exports, "createIgnoreWordsDictionary", { enumerable: true, get: function () { return SpellingDictionary_1.createIgnoreWordsDictionary; } });
Object.defineProperty(exports, "createInlineSpellingDictionary", { enumerable: true, get: function () { return SpellingDictionary_1.createInlineSpellingDictionary; } });
Object.defineProperty(exports, "createSpellingDictionary", { enumerable: true, get: function () { return SpellingDictionary_1.createSpellingDictionary; } });
Object.defineProperty(exports, "createSpellingDictionaryFromTrieFile", { enumerable: true, get: function () { return SpellingDictionary_1.createSpellingDictionaryFromTrieFile; } });
//# sourceMappingURL=index.js.map
import type { IterableLike } from '../util/IterableLike';
import type { DictionaryInfo, SpellingDictionary, SpellingDictionaryOptions } from './SpellingDictionary';
export declare const defaultOptions: SpellingDictionaryOptions;
/**

@@ -5,0 +4,0 @@ * Create a SpellingDictionary

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createFailedToLoadDictionary = exports.createSpellingDictionary = exports.defaultOptions = void 0;
exports.createFailedToLoadDictionary = exports.createSpellingDictionary = void 0;
const cspell_trie_lib_1 = require("cspell-trie-lib");
const fast_equals_1 = require("fast-equals");
const simpleCache_1 = require("../util/simpleCache");
const SpellingDictionary_1 = require("./SpellingDictionary");
const SpellingDictionaryFromTrie_1 = require("./SpellingDictionaryFromTrie");
const SpellingDictionaryMethods_1 = require("./SpellingDictionaryMethods");
exports.defaultOptions = Object.freeze({
weightMap: undefined,
});
const cachedDictionaries = new simpleCache_1.AutoWeakCache(_createSpellingDictionary, 64);

@@ -47,3 +45,3 @@ const maxSetSize = 3;

const trie = (0, cspell_trie_lib_1.buildTrieFast)(words);
const opts = { ...(options || exports.defaultOptions) };
const opts = { ...(options || SpellingDictionary_1.defaultOptions) };
if (opts.weightMap === undefined && opts.dictionaryInformation) {

@@ -50,0 +48,0 @@ opts.weightMap = (0, SpellingDictionaryMethods_1.createWeightMapFromDictionaryInformation)(opts.dictionaryInformation);

@@ -29,4 +29,4 @@ "use strict";

const cspell_trie_lib_1 = require("cspell-trie-lib");
const createSpellingDictionary_1 = require("./createSpellingDictionary");
const Defaults = __importStar(require("./defaults"));
const SpellingDictionary_1 = require("./SpellingDictionary");
const SpellingDictionaryFromTrie_1 = require("./SpellingDictionaryFromTrie");

@@ -37,3 +37,3 @@ const SpellingDictionaryMethods_1 = require("./SpellingDictionaryMethods");

constructor(trie, name, source) {
super(trie, name, createSpellingDictionary_1.defaultOptions, source);
super(trie, name, SpellingDictionary_1.defaultOptions, source);
this.name = name;

@@ -40,0 +40,0 @@ this.source = source;

export { CachingDictionary, createCachingDictionary } from './CachingDictionary';
export { createInlineSpellingDictionary } from './createInlineSpellingDictionary';
export { createFailedToLoadDictionary, createSpellingDictionary } from './createSpellingDictionary';
export { createFlagWordsDictionary, createFlagWordsDictionary as createForbiddenWordsDictionary, } from './FlagWordsDictionary';
export { createIgnoreWordsDictionary } from './IgnoreWordsDictionary';
export type { FindOptions, FindResult, HasOptions, SearchOptions, SpellingDictionary, SpellingDictionaryOptions, SuggestionCollector, SuggestionResult, SuggestOptions, } from './SpellingDictionary';
export type { DictionaryDefinitionInline, FindOptions, FindResult, HasOptions, SearchOptions, SpellingDictionary, SpellingDictionaryOptions, SuggestionCollector, SuggestionResult, SuggestOptions, } from './SpellingDictionary';
export { createCollection, SpellingDictionaryCollection } from './SpellingDictionaryCollection';

@@ -7,0 +8,0 @@ export { createSpellingDictionaryFromTrieFile } from './SpellingDictionaryFromTrie';

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createTyposDictionary = exports.createSpellingDictionaryFromTrieFile = exports.createCollection = exports.createIgnoreWordsDictionary = exports.createForbiddenWordsDictionary = exports.createFlagWordsDictionary = exports.createSpellingDictionary = exports.createFailedToLoadDictionary = exports.createCachingDictionary = void 0;
exports.createTyposDictionary = exports.createSpellingDictionaryFromTrieFile = exports.createCollection = exports.createIgnoreWordsDictionary = exports.createForbiddenWordsDictionary = exports.createFlagWordsDictionary = exports.createSpellingDictionary = exports.createFailedToLoadDictionary = exports.createInlineSpellingDictionary = exports.createCachingDictionary = void 0;
var CachingDictionary_1 = require("./CachingDictionary");
Object.defineProperty(exports, "createCachingDictionary", { enumerable: true, get: function () { return CachingDictionary_1.createCachingDictionary; } });
var createInlineSpellingDictionary_1 = require("./createInlineSpellingDictionary");
Object.defineProperty(exports, "createInlineSpellingDictionary", { enumerable: true, get: function () { return createInlineSpellingDictionary_1.createInlineSpellingDictionary; } });
var createSpellingDictionary_1 = require("./createSpellingDictionary");

@@ -7,0 +9,0 @@ Object.defineProperty(exports, "createFailedToLoadDictionary", { enumerable: true, get: function () { return createSpellingDictionary_1.createFailedToLoadDictionary; } });

import type { DictionaryInformation, ReplaceMap } from '@cspell/cspell-types';
import type { CompoundWordsMethod, SuggestionCollector, SuggestionResult, WeightMap } from 'cspell-trie-lib';
export { CompoundWordsMethod, SuggestionCollector, SuggestionResult } from 'cspell-trie-lib';
export type { DictionaryDefinitionInline } from '@cspell/cspell-types';
export { CompoundWordsMethod, type SuggestionCollector, type SuggestionResult } from 'cspell-trie-lib';
export interface SearchOptions {

@@ -141,2 +142,3 @@ /**

export type SuggestArgs = Parameters<SpellingDictionary['suggest']> | Parameters<(word: string, numSuggestions?: number, compoundMethod?: CompoundWordsMethod, numChanges?: number, ignoreCase?: boolean) => SuggestionResult[]>;
export declare const defaultOptions: SpellingDictionaryOptions;
//# sourceMappingURL=SpellingDictionary.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CompoundWordsMethod = void 0;
exports.defaultOptions = exports.CompoundWordsMethod = void 0;
var cspell_trie_lib_1 = require("cspell-trie-lib");
Object.defineProperty(exports, "CompoundWordsMethod", { enumerable: true, get: function () { return cspell_trie_lib_1.CompoundWordsMethod; } });
exports.defaultOptions = Object.freeze({
weightMap: undefined,
});
//# sourceMappingURL=SpellingDictionary.js.map
{
"name": "cspell-dictionary",
"version": "6.22.0",
"version": "6.23.0",
"description": "A spelling dictionary library useful for checking words and getting suggestions.",

@@ -42,13 +42,13 @@ "main": "dist/index.js",

"@types/jest": "^29.4.0",
"jest": "^29.4.1",
"jest": "^29.4.2",
"ts-jest": "^29.0.5"
},
"dependencies": {
"@cspell/cspell-pipe": "6.22.0",
"@cspell/cspell-types": "6.22.0",
"cspell-trie-lib": "6.22.0",
"@cspell/cspell-pipe": "6.23.0",
"@cspell/cspell-types": "6.23.0",
"cspell-trie-lib": "6.23.0",
"fast-equals": "^4.0.3",
"gensequence": "^4.0.3"
},
"gitHead": "a133874ed7590cbe140f5067cfa80db84b644a5d"
"gitHead": "a7cfbfa6cf42c9d9746dd8229d9f1317472e5af8"
}
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