Skip to content

Code Overview

Stores

The features store (stores/featuresStore.ts) keeps track of the features states. The store uses the configured persistence to store the feature states permanently.

Persistence

There's an interface "FeaturesPersistence"

typescript
import Persistence from 'src/core/persistence/Persistence'

interface FeaturesPersistence extends Persistence {
  getActiveFeatures(): Promise<string[]>

  saveActiveFeatures(val: string[]): any
}

export default FeaturesPersistence

with two implementations, using the local storage or the browsers indexedDB respectively

Released under the MIT License.