0.1.12 • Published 4 years ago

featurize v0.1.12

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

Better Featurize documentation hopefully coming soon!

Installation

npm install --save featurize

Usage

Import featurize:

import { featurize } from 'featurize';

Create a featurize instance:

import { features, filters, env } from './config';

const instance = featurize({
	features,
	filters,
	env
});

featurize accepts an object with 3 properties:

  • features: an array of feature objects
  • filters: an object with an options and state property
  • env: a string value to represent which feature version to use

feature object:

This is a barebones feature object. There will be an explanation for each property below.

const feature = {
	name: 'Feature',
	versions: {},
	states: [],
	sections: [],
	filters: {},
	data: {}
};

name:

A unique string identifier for each particular feature

versions:

An object containing custom properties that explicitly references the env property with custom properties each containing the value of a version string, for example:

versions: {
    dev: '3.4.9',
    prod: '3.0.0'
}

or:

versions: {
    someEnvName: 'beta',
    anotherEnvName: 'alpha'
}

Version properties and values can be whatever you like, they just need to be used in conjunction with the library's API (a full detailed usage example will be provided).

0.1.12

4 years ago

0.1.10

4 years ago

0.1.11

4 years ago

0.1.9

4 years ago

0.1.8

4 years ago

0.1.7

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago