dictionary-en-za
Advanced tools
Comparing version 2.0.4 to 2.1.0
20
index.js
@@ -1,3 +0,3 @@ | ||
var read = require('fs').readFile | ||
var join = require('path').join | ||
const fs = require('fs') | ||
const path = require('path') | ||
@@ -7,5 +7,5 @@ module.exports = load | ||
function load(callback) { | ||
var pos = -1 | ||
var exception = null | ||
var result = {} | ||
let result = {} | ||
let pos = -1 | ||
let exception | ||
@@ -16,11 +16,11 @@ one('aff') | ||
function one(name) { | ||
read(join(__dirname, 'index.' + name), function (err, doc) { | ||
fs.readFile(path.join(__dirname, 'index.' + name), (error, doc) => { | ||
pos++ | ||
exception = exception || err | ||
exception = exception || error | ||
result[name] = doc | ||
if (pos) { | ||
callback(exception, exception ? null : result) | ||
exception = null | ||
result = null | ||
callback(exception, exception ? undefined : result) | ||
exception = undefined | ||
result = undefined | ||
} | ||
@@ -27,0 +27,0 @@ }) |
{ | ||
"name": "dictionary-en-za", | ||
"version": "2.0.4", | ||
"version": "2.1.0", | ||
"description": "English (South Africa) spelling dictionary in UTF-8", | ||
@@ -5,0 +5,0 @@ "license": "LGPL-2.1", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
667631