@edirect/tokenization 0.0.7 → 0.0.9
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/dist/index.js +4 -0
- package/dist/index.mjs +4 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -107,6 +107,9 @@ var TokenEvaluator = class {
|
|
|
107
107
|
return config.defaultClassification > 0;
|
|
108
108
|
}
|
|
109
109
|
const ret = config.fields.map((field) => {
|
|
110
|
+
if (!field.classification) {
|
|
111
|
+
return false;
|
|
112
|
+
}
|
|
110
113
|
return this.evaluator.Evaluate(field.path, ...path);
|
|
111
114
|
});
|
|
112
115
|
return ret.some((r) => r) || config.defaultClassification > 0;
|
|
@@ -209,6 +212,7 @@ var TokenizationApp = class {
|
|
|
209
212
|
notFound: {}
|
|
210
213
|
};
|
|
211
214
|
traverse(payload, (value, path) => {
|
|
215
|
+
if (!value) return;
|
|
212
216
|
if (this.evaluator.shouldTokenizeField(config, path)) {
|
|
213
217
|
const fromCache = this.cache.get(value.toString());
|
|
214
218
|
if (fromCache) {
|
package/dist/index.mjs
CHANGED
|
@@ -81,6 +81,9 @@ var TokenEvaluator = class {
|
|
|
81
81
|
return config.defaultClassification > 0;
|
|
82
82
|
}
|
|
83
83
|
const ret = config.fields.map((field) => {
|
|
84
|
+
if (!field.classification) {
|
|
85
|
+
return false;
|
|
86
|
+
}
|
|
84
87
|
return this.evaluator.Evaluate(field.path, ...path);
|
|
85
88
|
});
|
|
86
89
|
return ret.some((r) => r) || config.defaultClassification > 0;
|
|
@@ -183,6 +186,7 @@ var TokenizationApp = class {
|
|
|
183
186
|
notFound: {}
|
|
184
187
|
};
|
|
185
188
|
traverse(payload, (value, path) => {
|
|
189
|
+
if (!value) return;
|
|
186
190
|
if (this.evaluator.shouldTokenizeField(config, path)) {
|
|
187
191
|
const fromCache = this.cache.get(value.toString());
|
|
188
192
|
if (fromCache) {
|