4.0.1 • Published 1 month ago
@storyous/features v4.0.1
features
Usage
import { Features } from '@storyous/features';
// cache initialization
const instance = new Features();
instance.init({
baseUrl, // url of featureService
globalQueryParams, // query params to featureService {environment: test}
ttl, // lifetime of cache, default 1 minute
fetchTimeout, // default 20000 ms
databaseCache, // optional field for persisting cache in database, if ommited, data are cached only in memory
});
// check if feature is enabled
await instance.enabled(
"choice",
{ merchantId: "639c81da83c2c20709c84fab" }, // aditional query parameters
{
fallBackValue: true, // default value if there is a error during fetching feature and there is no value in cache yet
timeout: 5000, // timeout for fetching feature from service, default 2000 ms
}, // boolean or "error"
)
...
4.0.1
1 month ago
4.0.0
1 month ago
3.3.1
6 years ago
3.3.0
6 years ago
3.1.2
7 years ago
3.1.1
7 years ago
3.1.0
7 years ago
3.0.2
8 years ago
3.0.1
8 years ago
3.0.0
8 years ago
2.3.4
8 years ago
2.3.3
8 years ago
2.3.2
8 years ago
2.3.1
8 years ago
2.3.0
8 years ago
2.2.1
8 years ago
2.2.0
8 years ago
2.1.1
8 years ago
2.1.0
8 years ago
2.0.2
8 years ago
2.0.1
8 years ago
1.2.1
8 years ago
2.0.0
8 years ago
1.2.0
8 years ago
1.1.2
8 years ago
1.1.1
8 years ago
1.1.0
8 years ago
1.0.5
8 years ago
1.0.4
8 years ago
1.0.3
8 years ago
1.0.2
8 years ago
1.0.1
8 years ago
1.0.0
8 years ago