ipa-core 1.3.4 → 1.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +1 -1
- package/package.json +1 -1
- package/parser.js +2 -2
package/index.js
CHANGED
|
@@ -4,7 +4,7 @@ const modifiers = require("./modifiers.js"); // diacritics, tones, suprasegmenta
|
|
|
4
4
|
const rules = require("./rules.js"); // modifier compatibility rules
|
|
5
5
|
const parser = require("./parser.js"); // parser (parsePhoneme, parseUnit, parseConfig)
|
|
6
6
|
const dictionary = require("./dictionary.js"); //instructional definitions
|
|
7
|
-
const getDefinitions = require("./get-definitions.js"); //compiles and formats instructions
|
|
7
|
+
const { getDefinitions } = require("./get-definitions.js"); //compiles and formats instructions
|
|
8
8
|
|
|
9
9
|
// Export the layers so users can access them if needed
|
|
10
10
|
const { parsePhoneme, parseUnit, parseConfig } = parser;
|
package/package.json
CHANGED
package/parser.js
CHANGED
|
@@ -111,8 +111,8 @@ function validateSequence(sequenceObj) {
|
|
|
111
111
|
}
|
|
112
112
|
if (req.features) {
|
|
113
113
|
for (const [key, value] of Object.entries(req.features)) {
|
|
114
|
-
if (component.features[key]
|
|
115
|
-
throw new Error(`${type} requires position ${req.position} to have features.${key}
|
|
114
|
+
if (!component.features[key].includes(value)) {
|
|
115
|
+
throw new Error(`${type} requires position ${req.position} to have features.${key} containing "${value}", got "${component.features[key]}"`);
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
118
|
}
|