@lwc/features
LWC Features Flags
Last updated 10 days ago by diervo .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @lwc/features 
SYNC missed versions from official npm registry.

Features

RFC

Compile-time flags

Runtime flags

Runtime flags can be enabled or disabled by setting a boolean value for that flag in globalThis.LWC_config.features. If the flag is not explicitly configured, the feature is disabled by default. This configuration object must appear before @lwc/engine is initialized and should be defined at the application layer.

Limitations

Must be all uppercase

// Does not work
if (enableFoo) {
    ...
}

// Does work
if (ENABLE_FOO) {
    ...
}

Only works with if-statements

// Does not work
const foo = ENABLE_FOO ? 1 : 2;

// Does work
let foo;
if (ENABLE_FOO) {
    foo = 1;
} else {
    foo = 2;
}

Only works with identifiers

// Does not work
if (isTrue(ENABLE_AWESOME_FEATURE)) {
    // awesome feature
}

// Does work
if (ENABLE_AWESOME_FEATURE) {
    // awesome feature
}

Initialization code cannot be tested

Toggling the value of ENABLE_FOO during a test will not change the return value of getFooValue.

import { ENABLE_FOO } from '@lwc/features';

let foo;
if (ENABLE_FOO) {
    foo = 1;
} else {
    foo = 2;
}

function getFooValue() {
    return foo;
}

Current Tags

  • 1.7.15-alpha3                                ...           canary (a month ago)
  • 1.8.6                                ...           latest (10 days ago)
  • 1.8.6-alpha.0                                ...           next (10 days ago)
  • 1.1.13-224.8                                ...           spring20 (9 months ago)
  • 1.3.7-226.7                                ...           summer20 (3 months ago)
  • 1.7.10-228.5                                ...           winter21 (a month ago)

261 Versions

  • 1.8.6-alpha.0                                ...           10 days ago
  • 1.8.6                                ...           10 days ago
  • 1.8.5                                ...           13 days ago
  • 1.8.4                                ...           21 days ago
  • 1.7.10-228.5                                ...           a month ago
  • 1.7.10-228.4                                ...           a month ago
  • 1.8.3                                ...           a month ago
  • 1.7.10-228.3                                ...           a month ago
  • 1.7.10-228.2                                ...           a month ago
  • 1.8.2                                ...           a month ago
  • 1.8.1                                ...           a month ago
  • 1.8.0                                ...           a month ago
  • 1.7.15-alpha3                                ...           a month ago
  • 1.7.15-alpha2                                ...           a month ago
  • 1.7.15-alpha1                                ...           a month ago
  • 1.7.14-alpha4                                ...           2 months ago
  • 1.7.14-alpha3                                ...           2 months ago
  • 1.7.14-alpha2                                ...           2 months ago
  • 1.7.14                                ...           2 months ago
  • 1.7.14-alpha1                                ...           2 months ago
  • 1.7.13                                ...           2 months ago
  • 1.7.13-alpha1                                ...           2 months ago
  • 1.7.12                                ...           2 months ago
  • 1.7.11                                ...           2 months ago
  • 1.7.11-locker-alpha1                                ...           2 months ago
  • 1.7.10-228.1                                ...           3 months ago
  • 1.7.10                                ...           3 months ago
  • 1.3.7-226.7                                ...           3 months ago
  • 1.7.9                                ...           3 months ago
  • 1.7.9-alpha2                                ...           3 months ago
  • 1.7.9-alpha1                                ...           3 months ago
  • 1.7.8                                ...           3 months ago
  • 1.7.7                                ...           3 months ago
  • 1.7.6                                ...           3 months ago
  • 1.7.5                                ...           4 months ago
  • 1.7.5-alpha1                                ...           4 months ago
  • 1.7.4                                ...           4 months ago
  • 1.7.3-lockerpreview-alpha1                                ...           4 months ago
  • 1.7.3                                ...           4 months ago
  • 1.7.3-alpha4                                ...           4 months ago
  • 1.7.3-alpha1                                ...           4 months ago
  • 1.7.2                                ...           4 months ago
  • 1.3.7-226.6                                ...           4 months ago
  • 1.3.7-226.5                                ...           4 months ago
  • 1.7.1                                ...           4 months ago
  • 1.7.0                                ...           5 months ago
  • 1.6.9                                ...           5 months ago
  • 1.6.9-alpha1                                ...           5 months ago
  • 1.7.0-alpha1                                ...           5 months ago
  • 1.6.8                                ...           5 months ago
  • 1.6.7                                ...           5 months ago
  • 1.6.7-alpha1                                ...           5 months ago
  • 1.6.6                                ...           5 months ago
  • 1.6.6-alpha1                                ...           5 months ago
  • 1.6.5                                ...           5 months ago
  • 1.6.4                                ...           5 months ago
  • 1.16.4                                ...           5 months ago
  • 1.6.3                                ...           5 months ago
  • 1.6.3-alpha1                                ...           5 months ago
  • 1.6.2-alpha4                                ...           5 months ago
  • 1.6.2                                ...           5 months ago
  • 1.6.2-alpha3                                ...           5 months ago
  • 1.6.2-alpha2                                ...           5 months ago
  • 1.6.2-alpha1                                ...           5 months ago
  • 1.6.1                                ...           5 months ago
  • 1.6.1-alpha4                                ...           5 months ago
  • 1.6.1-alpha3                                ...           5 months ago
  • 1.6.1-alpha2                                ...           5 months ago
  • 1.6.1-alpha1                                ...           5 months ago
  • 1.6.0                                ...           6 months ago
  • 1.5.4                                ...           6 months ago
  • 1.5.3                                ...           6 months ago
  • 1.5.3-alpha5                                ...           6 months ago
  • 1.5.3-alpha4                                ...           6 months ago
  • 1.5.3-alpha3                                ...           6 months ago
  • 1.5.2-alpha5                                ...           6 months ago
  • 1.5.2-alpha4                                ...           6 months ago
  • 1.5.3-alpha2                                ...           6 months ago
  • 1.5.3-alpha1                                ...           6 months ago
  • 1.5.2                                ...           6 months ago
  • 1.5.2-alpha3                                ...           6 months ago
  • 1.5.2-alpha2                                ...           6 months ago
  • 0.228.7                                ...           6 months ago
  • 0.228.7-alpha1                                ...           6 months ago
  • 0.228.7-alpha0                                ...           6 months ago
  • 0.228.6                                ...           6 months ago
  • 0.228.6-alpha0                                ...           6 months ago
  • 1.5.2-alpha1                                ...           6 months ago
  • 1.5.1                                ...           6 months ago
  • 0.228.5                                ...           6 months ago
  • 0.228.5-alpha0                                ...           6 months ago
  • 1.5.0                                ...           6 months ago
  • 1.5.0-alpha5                                ...           6 months ago
  • 1.5.0-alpha0                                ...           6 months ago
  • 1.5.0-alpha4                                ...           6 months ago
  • 1.3.7-228.4                                ...           6 months ago
  • 1.3.7-226.5-alpha3                                ...           6 months ago
  • 1.3.7-226.5-alpha2                                ...           6 months ago
  • 1.3.7-228.3                                ...           6 months ago
  • 1.3.7-228.2                                ...           6 months ago
  • 1.3.7-228.1                                ...           6 months ago
  • 1.5.0-alpha3                                ...           6 months ago
  • 1.3.7-226.5-alpha1                                ...           7 months ago
  • 1.3.7-226.4                                ...           7 months ago
  • 1.3.7-226.3                                ...           7 months ago
  • 1.3.7-226.3-alpha0                                ...           7 months ago
  • 1.4.0                                ...           7 months ago
  • 1.3.7-226.2                                ...           7 months ago
  • 1.3.7-226.1                                ...           7 months ago
  • 1.3.7-226.1-alpha1                                ...           7 months ago
  • 1.3.7-226.1-alpha0                                ...           7 months ago
  • 1.5.0-alpha2                                ...           7 months ago
  • 1.5.0-alpha1                                ...           7 months ago
  • 1.4.0-alpha3                                ...           7 months ago
  • 1.3.13-alpha1                                ...           7 months ago
  • 1.3.12                                ...           7 months ago
  • 1.3.12-alpha2                                ...           7 months ago
  • 1.3.12-alpha1                                ...           7 months ago
  • 1.4.0-alpha2                                ...           7 months ago
  • 1.4.0-alpha1                                ...           7 months ago
  • 1.3.11                                ...           7 months ago
  • 1.3.11-alpha1                                ...           7 months ago
  • 1.3.10                                ...           7 months ago
  • 1.3.9                                ...           7 months ago
  • 1.3.8                                ...           7 months ago
  • 1.3.8-alpha2                                ...           7 months ago
  • 1.3.8-alpha1                                ...           7 months ago
  • 1.3.7-226.0                                ...           7 months ago
  • 1.3.7                                ...           7 months ago
  • 1.3.7-alpha2                                ...           7 months ago
  • 1.3.7-alpha1                                ...           7 months ago
  • 1.3.6                                ...           7 months ago
  • 1.3.6-alpha4                                ...           7 months ago
  • 1.3.6-alpha3                                ...           8 months ago
  • 1.3.6-alpha2                                ...           8 months ago
  • 1.3.6-alpha1                                ...           8 months ago
  • 1.3.5                                ...           8 months ago
  • 1.3.4-alpha0                                ...           8 months ago
  • 1.3.4                                ...           8 months ago
  • 1.3.3                                ...           8 months ago
  • 1.3.3-alpha1                                ...           8 months ago
  • 1.3.2                                ...           8 months ago
  • 1.3.2-alpha1                                ...           8 months ago
  • 1.3.1                                ...           8 months ago
  • 1.3.1-alpha1                                ...           8 months ago
  • 1.3.0                                ...           8 months ago
  • 1.2.5                                ...           8 months ago
  • 1.2.5-alpha21                                ...           8 months ago
  • 1.2.5-alpha20 [deprecated]           ...           8 months ago
  • 1.2.5-alpha19 [deprecated]           ...           8 months ago
  • 1.2.5-alpha18 [deprecated]           ...           8 months ago
  • 1.2.5-alpha17 [deprecated]           ...           8 months ago
  • 1.2.5-alpha16 [deprecated]           ...           8 months ago
  • 1.2.5-alpha13 [deprecated]           ...           8 months ago
  • 1.2.5-alpha12 [deprecated]           ...           8 months ago
  • 1.2.5-alpha11 [deprecated]           ...           8 months ago
  • 1.2.5-alpha10 [deprecated]           ...           8 months ago
  • 1.2.5-alpha9 [deprecated]           ...           8 months ago
  • 1.2.5-alpha8 [deprecated]           ...           8 months ago
  • 1.2.5-alpha7 [deprecated]           ...           8 months ago
  • 1.2.5-alpha6 [deprecated]           ...           8 months ago
  • 1.2.5-alpha5 [deprecated]           ...           8 months ago
  • 1.2.5-alpha4 [deprecated]           ...           8 months ago
  • 1.2.5-alpha3 [deprecated]           ...           8 months ago
  • 1.2.5-alpha2 [deprecated]           ...           8 months ago
  • 1.2.5-alpha1 [deprecated]           ...           8 months ago
  • 1.3.0-alpha6                                ...           8 months ago
  • 1.2.4                                ...           8 months ago
  • 1.2.3                                ...           8 months ago
  • 1.3.0-alpha5                                ...           8 months ago
  • 1.3.0-alpha4                                ...           8 months ago
  • 1.3.0-alpha3                                ...           8 months ago
  • 1.2.2                                ...           9 months ago
  • 1.3.0-alpha2                                ...           9 months ago
  • 1.2.2-alpha2                                ...           9 months ago
  • 1.1.13-224.8                                ...           9 months ago
  • 1.1.13-224.8-alpha4                                ...           9 months ago
  • 1.1.13-224.8-alpha3                                ...           9 months ago
  • 1.1.13-224.8-alpha2                                ...           9 months ago
  • 1.1.13-224.8-alpha1                                ...           9 months ago
  • 1.2.2-alpha1                                ...           9 months ago
  • 1.1.13-224.7                                ...           9 months ago
  • 1.1.13-224.6                                ...           9 months ago
  • 1.1.13-224.5                                ...           9 months ago
  • 1.1.13-224.5-alpha1                                ...           9 months ago
  • 1.2.1                                ...           9 months ago
  • 1.2.1-alpha1                                ...           9 months ago
  • 1.3.0-alpha1                                ...           9 months ago
  • 1.2.0                                ...           9 months ago
  • 1.2.0-alpha15                                ...           9 months ago
  • 1.2.0-alpha14                                ...           9 months ago
  • 1.2.0-alpha13                                ...           9 months ago
  • 1.2.0-alpha12                                ...           9 months ago
  • 1.2.0-alpha10                                ...           9 months ago
  • 1.1.17-alpha1                                ...           9 months ago
  • 1.2.0-alpha9                                ...           9 months ago
  • 1.2.0-alpha8                                ...           9 months ago
  • 1.2.0-alpha6                                ...           9 months ago
  • 1.2.0-alpha5                                ...           9 months ago
  • 1.2.0-alpha1                                ...           9 months ago
  • 1.1.16                                ...           10 months ago
  • 1.1.16-alpha2                                ...           10 months ago
  • 1.1.16-alpha1                                ...           10 months ago
  • 1.1.13-224.4                                ...           10 months ago
  • 1.1.13-224.4alpha2                                ...           10 months ago
  • 1.1.13-224.4-alpha1                                ...           10 months ago
  • 1.1.15                                ...           10 months ago
  • 1.1.15-alpha1                                ...           10 months ago
  • 1.1.14                                ...           a year ago
  • 1.1.13-224.3                                ...           a year ago
  • 1.1.14-alpha5                                ...           a year ago
  • 1.1.14-alpha4                                ...           a year ago
  • 1.1.14-alpha3                                ...           a year ago
  • 1.1.14-alpha2                                ...           a year ago
  • 1.1.13-224.2                                ...           a year ago
  • 1.1.13-224.1                                ...           a year ago
  • 1.1.14-alpha1                                ...           a year ago
  • 1.1.13                                ...           a year ago
  • 1.1.12                                ...           a year ago
  • 1.1.12-alpha2                                ...           a year ago
  • 1.1.12-alpha1                                ...           a year ago
  • 1.1.11                                ...           a year ago
  • 1.1.11-alpha2                                ...           a year ago
  • 1.1.11-alpha1                                ...           a year ago
  • 1.1.11-alpha                                ...           a year ago
  • 1.1.10                                ...           a year ago
  • 1.1.10-alpha2                                ...           a year ago
  • 1.1.10-alpha1                                ...           a year ago
  • 1.1.9                                ...           a year ago
  • 1.1.9-alpha1                                ...           a year ago
  • 1.1.8                                ...           a year ago
  • 1.1.8-alpha1                                ...           a year ago
  • 1.1.7                                ...           a year ago
  • 1.1.7-alpha.0                                ...           a year ago
  • 1.1.6                                ...           a year ago
  • 1.1.5                                ...           a year ago
  • 1.1.4-alpha7                                ...           a year ago
  • 1.1.4-alpha6                                ...           a year ago
  • 1.1.4-alpha5                                ...           a year ago
  • 1.1.4-alpha4                                ...           a year ago
  • 1.2.0-alpha4                                ...           a year ago
  • 1.1.4-alpha891                                ...           a year ago
  • 1.1.4-alpha890                                ...           a year ago
  • 1.1.4-alpha889                                ...           a year ago
  • 1.1.4-alpha888                                ...           a year ago
  • 1.1.4-alpha3                                ...           a year ago
  • 1.2.0-alpha3                                ...           a year ago
  • 1.1.4-alpha2                                ...           a year ago
  • 1.1.4-alpha1                                ...           a year ago
  • 1.1.4                                ...           a year ago
  • 1.1.3                                ...           a year ago
  • 1.1.2-alpha1                                ...           a year ago
  • 1.1.1                                ...           a year ago
  • 1.1.1-alpha6                                ...           a year ago
  • 1.1.1-alpha5                                ...           a year ago
  • 1.1.1-alpha4                                ...           a year ago
  • 1.2.0-alpha2                                ...           a year ago
  • 1.1.1-alpha3                                ...           a year ago
  • 1.1.1-alpha2                                ...           a year ago
  • 1.1.1-alpha1                                ...           a year ago
  • 1.1.0                                ...           a year ago
Downloads
Today 15
This Week 15
This Month 97
Last Day 0
Last Week 15
Last Month 277
Dependencies (0)
None
Dev Dependencies (1)
Dependents (2)

Copyright 2014 - 2016 © taobao.org |