
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@datadog/openfeature-browser
Advanced tools
Browser-specific bindings for OpenFeature (wraps @datadog/openfeature-core)
npm install @datadog/openfeature-browser
The main entry point is DatadogProvider, which is a provider for the OpenFeature Web SDK.
import { DatadogProvider } from '@datadog/openfeature-browser'
import { OpenFeature } from '@openfeature/web-sdk'
// Initialize the provider
const provider = new DatadogProvider({
clientToken: 'your-datadog-client-token',
enableExposureLogging: true,
enableFlagEvaluationTracking: true,
site: 'datadoghq.com',
})
// Set the provider
await OpenFeature.setProvider(provider)
// Get a client and evaluate flags
const client = OpenFeature.getClient()
const flagValue = await client.getBooleanValue('my-flag', false)
const provider = new DatadogProvider({
// Required
clientToken: 'pub_...', // Your Datadog client token
site: 'datadoghq.com', // Datadog site (datadoghq.com, datadoghq.eu, etc.)
env: 'production', // Environment
// Optional Datadog configuration
service: 'my-service', // Service name
version: '1.0.0', // Application version
applicationId: 'app-id', // Your application ID for RUM attribution
// Enable exposure logging
enableExposureLogging: true,
// Enable flag evaluation tracking
enableFlagEvaluationTracking: true,
})
const client = OpenFeature.getClient()
// Boolean flags
const showFeature = await client.getBooleanValue('show-new-feature', false)
// String flags
const theme = await client.getStringValue('app-theme', 'light')
// Number flags
const timeout = await client.getNumberValue('request-timeout', 5000)
// Object flags
const config = await client.getObjectValue('feature-config', {})
Context must be set globally before flag evaluation and affects all subsequent evaluations:
// Set global context (async operation)
await OpenFeature.setContext({
targetingKey: 'user-123',
user: { id: 'user-123', email: 'user@example.com' },
})
// Now evaluate flags with the context
const result = await client.getBooleanDetails('premium-feature', false)
console.log(result.value) // Flag value
console.log(result.reason) // Evaluation reason
FAQs
Browser-specific bindings for OpenFeature (wraps @datadog/openfeature-core)
The npm package @datadog/openfeature-browser receives a total of 31,586 weekly downloads. As such, @datadog/openfeature-browser popularity was classified as popular.
We found that @datadog/openfeature-browser demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.