NodeJS API Reference

Constructor


  new FeatureFlagTechClient( credentials, overrideValues );
      

Instantiates a new FeatureFlagClient object.

Arguments:

Properties:

Methods

getFile()


  await getFlag();
      

Asynchronously fetches the feature flag file. If the flag is found the returned Promise resolves. If the request 404s or is not JSON then the Promise rejects.

Returns: Promise

Arguments:

get( featureName )


  get( "myNewFeature" );
      

Returns a feature value from the feature flag.

Returns: String.

Arguments:

when( featureName )


  when( "myNewFeature" )
      

Chaining function used with the is and else methods to access flag values in an expressive style. Returns self.

Returns: self.

Arguments:

is( flagValueToMatch, callback )


  is( true, () => {
    /* ... */
  })
      

Chaining function used with the when and else methods to access flag values in an expressive style. Returns self.

Returns: self.

Arguments:

else( callback )


  else( () => {
    /* ... */
  })
      

Pass in a callback to perform if none of the chained is method calls match the flag value.

Returns: nothing.

Arguments:

Not found what you wanted? Tell us what you're after.