New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

dictionary-en-za

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dictionary-en-za - npm Package Compare versions

Comparing version 1.0.2 to 1.2.0

82

index.js

@@ -1,71 +0,29 @@

/**
* @author Titus Wormer
* @copyright 2015 Titus Wormer
* @license MIT
* @module dictionary-en-za
* @fileoverview English (South Africa) spelling dictionary in UTF-8.
*/
/*
* Dependencies.
*/
/* Dependencies. */
var read = require('fs').readFile;
var join = require('path').join;
/**
* A dictionary.
*
* @typedef {Object} Dictionary
* @property {Buffer} dic - Dictionary buffer in UTF-8.
* @property {Buffer} add - Affix buffer in UTF-8.
*/
/* Expose. */
module.exports = load;
/**
* Callback invoked with a dictionary.
*
* @callback callback
* @param {Error?} err - Error while reading the dictionary
* files.
* @param {Dictionary?} dictionary - A dictionary.
*/
/**
* Load the dictionaries.
*
* @param {callback} callback
*/
/* Load the dictionary-en-za dictionaries. */
function load(callback) {
var pos = -1;
var exception = null;
var result = {};
var pos = -1;
var exception = null;
var result = {};
/**
* Load a file.
*
* @param {string} name - Extension and type of file
* to load.
*/
function one(name) {
read(join(__dirname, 'index.' + name), function (err, doc) {
pos++;
one('aff');
one('dic');
exception = exception || err;
result[name] = doc;
function one(name) {
read(join(__dirname, 'index.' + name), function (err, doc) {
pos++;
exception = exception || err;
result[name] = doc;
if (pos) {
callback(exception, !exception && result)
result = exception = null;
}
});
}
one('aff');
one('dic');
if (pos) {
callback(exception, exception ? null : result);
result = exception = null;
}
});
}
}
/*
* Expose.
*/
module.exports = load;
{
"name": "dictionary-en-za",
"version": "1.0.2",
"version": "1.2.0",
"description": "English (South Africa) spelling dictionary in UTF-8",

@@ -15,4 +15,11 @@ "license": "LGPL-2.1",

],
"repository": "wooorm/dictionary",
"author": "Titus Wormer <tituswormer@gmail.com>",
"repository": {
"type": "git",
"url": "https://github.com/wooorm/dictionaries"
},
"bugs": "https://github.com/wooorm/dictionaries/issues",
"author": "Titus Wormer <tituswormer@gmail.com> (http://wooorm.com)",
"contributors": [
"Titus Wormer <tituswormer@gmail.com> (http://wooorm.com)"
],
"main": "index.js",

@@ -19,0 +26,0 @@ "files": [

@@ -53,3 +53,3 @@ # dictionary-en-za

Dictionary and affix file: [LGPL-2.1][license]. Rest: MIT ©
Dictionary and affix file: [LGPL-2.1](https://github.com/wooorm/dictionaries/blob/master/dictionaries/en_ZA/LICENSE). Rest: MIT ©
[Titus Wormer][home].

@@ -67,6 +67,4 @@

[license]: https://github.com/wooorm/dictionaries/blob/master/dictionaries/en_ZA/LICENSE
[dictionaries]: https://github.com/wooorm/dictionaries
[home]: https://wooorm.com
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