Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
ff-nodejs-server-sdk
Advanced tools
Harness Feature Flags (FF) is a feature management solution that enables users to change the software’s functionality, without deploying new code. FF uses feature flags to hide code or behaviours without having to ship new versions of the software. A feature flag is like a powerful if statement.
For more information, see https://harness.io/products/feature-flags/
To read more, see https://ngdocs.harness.io/category/vjolt35atg-feature-flags
To sign up, https://app.harness.io/auth/#/signup/
npm install @harness/ff-nodejs-server-sdk
const { Client } = require('ff-nodejs-server-sdk');
import { Client } from 'ff-nodejs-server-sdk';
This is the most simple way to initialize SDK using only a server type key
const client = new Client('your server type SDK key');
Advanced initialization can be done using options
const client = new Client('your server type SDK key', {
enableStream: false
});
const target = {
identifier: 'harness',
name: 'Harness',
attributes: {}
};
const value = await client.boolVariation('test', target, false);
client.close();
function boolVariation(identifier: string, target: Target, defaultValue = true): Promise<boolean>;
function stringVariation(identifier, target: Target, defaultValue = ''): Promise<string>;
function numberVariation(identifier, target: Target, defaultValue = 1.0): Promise<number>;
function jsonVariation(identifier, target: Target, defaultValue = {}): Promise<Record<string, unknown>>;
function close();
baseUrl: string; // baseUrl is where the flag configurations are located
eventsUrl: string; // eventsUrl is where we send summarized target events
pollInterval: number; // pollInterval (default 60s)
eventsSyncInterval: number; // Metrics push event (default 60s)
enableStream: boolean; // enable server sent events
enableAnalytics: boolean; // enable analytics
cache: KeyValueStore; // set custom cache (default lru cache)
store: AsyncKeyValueStore; // set custom persistent store (default file store)
logger: Logger; // set logger (default console)
import CfClient from 'ff-nodejs-server-sdk';
CfClient.init('your server type SDK key');
const FLAG_KEY = 'test_bool';
const target = {
identifier: 'harness',
name: 'Harness',
attributes: {}
};
const defaultValue = false;
setInterval(async() => {
const value = await CfClient.boolVariation(FLAG_KEY, target, defaultValue);
console.log("Evaluation for flag test and target none: ", value);
}, 10000);
Licensed under the APLv2.
FAQs
Feature flags SDK for NodeJS environments
The npm package ff-nodejs-server-sdk receives a total of 0 weekly downloads. As such, ff-nodejs-server-sdk popularity was classified as not popular.
We found that ff-nodejs-server-sdk demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.