@ops-ai/nextjs-toggly-core
v1.10.0
Published
Core feature flag functionality for Next.js
Readme
@ops-ai/nextjs-toggly-core
Core feature flag functionality for Next.js
Install
npm install @ops-ai/nextjs-toggly-coreOptional gRPC transport (Node/server only):
npm install @grpc/grpc-js @grpc/proto-loaderImport gRPC helpers from @ops-ai/nextjs-toggly-core/telemetry/grpc — do not
import that subpath from Edge bundles.
Documentation
- docs.toggly.io
- SDK catalog: root README
Entity context
Pass a domain object on each isFeatureOn / evaluateFeatureGate call. User identity is separate from entity context. Register mappers with registerContext locally — this client does not PUT entity schemas.
Entity gates fail closed without context. See Next.js SDK.
client.registerContext('Product', (product) => ({
kind: 'Product',
key: String(product.id),
attributes: { Category: product.category },
}))
await client.isFeatureOn('NewBadge', product, 'Product')License
MIT — see also the repository LICENSE.
Issues
Use the structured issue templates.
