![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@naturalcycles/abba
Advanced tools
AB test assignment configuration tool for Node.js
A tool for generating and persisting AB test assignments
Below is an example of how you can instruct your audience on installing and setting up your app. This template doesn't rely on any external dependencies or services.
Install NPM packages
yarn add @naturalcyles/abba
or
npm install @naturalcyles/abba
Install the schema into your MySQL db instance using the migration script found here.
(Currently supports MySQL, probably all DocumentDBs but not verified.)
type AbbaConfig = {
db: CommonDB // from @naturalcycles/db-lib
}
const abba = new Abba(config: AbbaConfig)
Creates a new experiment
async createExperiment(
input: ExperimentInput,
buckets: BucketInput[]
): Promise<Saved<Experiment>>
Updates an existing experiment.
async updateExperiment(
id: number,
input: ExperimentInput,
buckets: BucketInput[]
): Promise<Saved<Experiment>>
Delete an experiment. Removes all users assignments and buckets
async deleteExperiment(
id: number
): Promise<void>
Gets all existing user assignments
async getAllExistingUserAssignments(
userId: string
): Promise<Saved<UserAssignment>[]>
Get an assignment for a given user. If existingOnly
is false, it will attempt generate a new
assignment. segmentationData
becomse required when existingOnly
is false
async getUserAssignment(
experimentId: number,
userId: string,
existingOnly: boolean,
segmentationData?: SegmentationData,
): Promise<GeneratedUserAssignment | null>
Generate user assignments for all active experiments. Will return any existing assignments and attempt to generate new assignments.
async generateUserAssignments(
userId: string,
segmentationData: SegmentationData,
): Promise<GeneratedUserAssignment[]>
Get assignment statistics for an experiment.
async getExperimentAssignmentStatistics(
experimentId: number
): Promise<AssignmentStatistics>
Experiments can be configured to target specific audiences using segmentation rules. When generating
assignments it is possible to test these rules using user segmentation data which is an object
containing key/value pairs unique to each user. (Allowed value types: string
, number
,
boolean
). A segmentation rule consist of the following properties:
key: string, // the key of the corresponding segmentationData property.
operator: '==' | '!=' | 'semver' | 'regex' | 'boolean', // the operator that will be used to execute the rule
value: string | number | boolean, // the value the operator will be executed against
Rule:
{ key: 'country', operator: '==', value: 'SE }
Example segmentation data:
{
country: 'SE', // valid
country: 'NO' // not valid
}
Rule:
{ key: 'country', operator: '!=', value: 'SE' }
Example segmentation data:
{
country: 'NO', // valid
country: 'SE' // not valid
}
Rule:
{ key: 'isEligible', operator: 'boolean', value: true }
Example segmentation data:
{
isEligible: true, // valid
isEligible: false // not valid
}
Rule:
{ key: 'appVersion', operator: 'semver', value: '>1.1.0' }
Example segmentation data:
{
appVersion: '1.2.0', // valid
appVersion: '1' // not valid
}
Rule:
{ key: 'country', operator: 'regex', value: 'SE|NO' }
Example segmentation data:
{
country: 'SE', // valid
country: 'NO', // valid
country: 'GB' // not valid
}
FAQs
AB test assignment configuration tool for Node.js
The npm package @naturalcycles/abba receives a total of 0 weekly downloads. As such, @naturalcycles/abba popularity was classified as not popular.
We found that @naturalcycles/abba demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.