Comparing version 0.0.5 to 0.0.6
@@ -5,3 +5,3 @@ { | ||
"description": "Extensible system for analysing and manipulating natural language", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"keywords": [ | ||
@@ -17,3 +17,3 @@ "natural", | ||
"dependencies": { | ||
"wooorm/parse-english": "^0.0.12" | ||
"wooorm/parse-english": "^0.0.13" | ||
}, | ||
@@ -20,0 +20,0 @@ "scripts" : [ |
28
index.js
@@ -53,29 +53,15 @@ /* jshint -W084, -W093 */ | ||
if (!parser) { | ||
/* istanbul ignore if: Not all `require` providers support dynamic | ||
* loading, needed for the next step, thus we skip the next | ||
* branch early. */ | ||
if (require.client || require.component) { | ||
parser = require('parse-english'); | ||
} else { | ||
parser = 'parse-english'; | ||
} | ||
parser = 'parse-english'; | ||
} | ||
if (typeof parser === 'string') { | ||
/* istanbul ignore if: Node always has a `cache`. Other `require` | ||
* vendors however don't support this feature. */ | ||
if (!cache) { | ||
throw new TypeError( | ||
'Illegal invocation: \'Retext\' in this environment ' + | ||
'can\'t require from scratch' | ||
); | ||
/* istanbul ignore else: TODO / TOSPEC */ | ||
/* Load the parser for vendors without dynamic-require's */ | ||
if (parser === 'parse-english') { | ||
parser = require('parse-english'); | ||
} else { | ||
for (attribute in cache) { | ||
if (attribute.indexOf('/' + parser + '/') !== -1) { | ||
delete cache[attribute]; | ||
} | ||
} | ||
parser = require(parser); | ||
} | ||
parser = parser(); | ||
} | ||
@@ -82,0 +68,0 @@ |
{ | ||
"name": "retext", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "Extensible system for analysing and manipulating natural language", | ||
@@ -17,3 +17,3 @@ "keywords": [ | ||
"dependencies": { | ||
"parse-english": "~0.0.12" | ||
"parse-english": "~0.0.13" | ||
}, | ||
@@ -20,0 +20,0 @@ "devDependencies": { |
@@ -37,16 +37,13 @@ | ||
/* istanbul ignore else: Node always has a `cache` property */ | ||
if (require.cache) { | ||
it('should create a new context/parser/textom when required, thus ' + | ||
'not requiring from memory', function () { | ||
var rootNode1 = new Retext().parse(), | ||
rootNode2 = new Retext().parse(); | ||
it('should create a new context/parser/textom when required, thus ' + | ||
'not requiring from memory', function () { | ||
var rootNode1 = new Retext().parse(), | ||
rootNode2 = new Retext().parse(); | ||
assert(rootNode1 instanceof rootNode1.constructor); | ||
assert(!(rootNode1 instanceof rootNode2.constructor)); | ||
assert(rootNode2 instanceof rootNode2.constructor); | ||
assert(!(rootNode2 instanceof rootNode1.constructor)); | ||
} | ||
); | ||
} | ||
assert(rootNode1 instanceof rootNode1.constructor); | ||
assert(!(rootNode1 instanceof rootNode2.constructor)); | ||
assert(rootNode2 instanceof rootNode2.constructor); | ||
assert(!(rootNode2 instanceof rootNode1.constructor)); | ||
} | ||
); | ||
@@ -53,0 +50,0 @@ it('should set the `plugins` attribute to an empty array', function () { |
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
20351
467
Updatedparse-english@~0.0.13