@openfin/core 41.100.44 → 41.100.45
Sign up to get free protection for your applications and to get access to all the features.
- package/out/mock.js +0 -25
- package/package.json +1 -1
package/out/mock.js
CHANGED
@@ -13235,31 +13235,6 @@ var utils$3 = {};
|
|
13235
13235
|
if (!context.type) {
|
13236
13236
|
return { isValid: false, reason: 'Context must have a type property' };
|
13237
13237
|
}
|
13238
|
-
if (context.id && typeof context.id !== 'object') {
|
13239
|
-
return {
|
13240
|
-
isValid: false,
|
13241
|
-
reason: 'Context id must be an Object populated with key-value identifiers (if set)'
|
13242
|
-
};
|
13243
|
-
}
|
13244
|
-
if (context.id) {
|
13245
|
-
const { id } = context;
|
13246
|
-
const keys = Object.keys(id);
|
13247
|
-
let foundBadIdentifier = false;
|
13248
|
-
if (!keys.length) {
|
13249
|
-
return { isValid: false, reason: 'Context id must have at least one key-value identifier' };
|
13250
|
-
}
|
13251
|
-
keys.forEach((key) => {
|
13252
|
-
if (typeof key !== 'string' || typeof id[key] !== 'string') {
|
13253
|
-
foundBadIdentifier = true;
|
13254
|
-
}
|
13255
|
-
});
|
13256
|
-
if (foundBadIdentifier) {
|
13257
|
-
return { isValid: false, reason: 'Context id key-value identifiers must be of type string' };
|
13258
|
-
}
|
13259
|
-
}
|
13260
|
-
if (context.name && typeof context.name !== 'string') {
|
13261
|
-
return { isValid: false, reason: 'Context name must be of string type (if set)' };
|
13262
|
-
}
|
13263
13238
|
return { isValid: true };
|
13264
13239
|
};
|
13265
13240
|
exports.checkContextIntegrity = checkContextIntegrity;
|