@reliance/feature-flags
Version:
A package for determining feature flag status based on environment variables or flag objects.
19 lines (16 loc) • 475 B
JavaScript
class PredicateNotAFunctionError extends Error {
constructor(featureName) {
super(`Value of "${featureName}" feature must be a predicate function`);
this.name = "PredicateNotAFunctionError";
}
}
class InvalidFeatureDefinition extends Error {
constructor() {
super(`Feature definitions must be an object and cannot be null`);
this.name = "InvalidFeatureDefinition";
}
}
module.exports = {
PredicateNotAFunctionError,
InvalidFeatureDefinition,
};