From a1f4c89af163d7702c26e63f849c9785eab0a998 Mon Sep 17 00:00:00 2001 From: AnyaWMa Date: Mon, 2 Oct 2023 21:24:03 -0700 Subject: [PATCH] 4.0.0 --- package-lock.json | 4 ++-- package.json | 2 +- src/__tests__/index.test.ts | 10 +++++----- src/index.ts | 7 ++++++- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index 47ba6b9..2100f05 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@bdelab/jscat", - "version": "3.0.5", + "version": "4.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@bdelab/jscat", - "version": "3.0.5", + "version": "4.0.0", "license": "ISC", "dependencies": { "@types/node": "^14.18.54", diff --git a/package.json b/package.json index 0a5613c..8671448 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@bdelab/jscat", - "version": "3.0.5", + "version": "4.0.0", "description": "A library to support IRT-based computer adaptive testing in JavaScript", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/src/__tests__/index.test.ts b/src/__tests__/index.test.ts index 413ee0a..e84c02e 100644 --- a/src/__tests__/index.test.ts +++ b/src/__tests__/index.test.ts @@ -54,11 +54,11 @@ describe('Cat', () => { ); }); - const s1: Stimulus = { difficulty: 0.5, c : 0.5, word: 'looking' }; - const s2: Stimulus = { difficulty: 3.5, c : 0.5, word: 'opaque' }; - const s3: Stimulus = { difficulty: 2, c : 0.5, word: 'right' }; - const s4: Stimulus = { difficulty: -2.5, c : 0.5, word: 'yes' }; - const s5: Stimulus = { difficulty: -1.8, c : 0.5, word: 'mom' }; + const s1: Stimulus = { difficulty: 0.5, c: 0.5, word: 'looking' }; + const s2: Stimulus = { difficulty: 3.5, c: 0.5, word: 'opaque' }; + const s3: Stimulus = { difficulty: 2, c: 0.5, word: 'right' }; + const s4: Stimulus = { difficulty: -2.5, c: 0.5, word: 'yes' }; + const s5: Stimulus = { difficulty: -1.8, c: 0.5, word: 'mom' }; const stimuli = [s1, s2, s3, s4, s5]; it('constructs an adaptive test', () => { diff --git a/src/index.ts b/src/index.ts index ed555eb..6291267 100644 --- a/src/index.ts +++ b/src/index.ts @@ -233,7 +233,12 @@ export class Cat { private selectorMFI(arr: Stimulus[]) { const stimuliAddFisher = arr.map((element: Stimulus) => ({ - fisherInformation: fisherInformation(this._theta, { a: element.a || 1, b: element.difficulty || 0, c: element.c || 0, d: element.d || 1 }), + fisherInformation: fisherInformation(this._theta, { + a: element.a || 1, + b: element.difficulty || 0, + c: element.c || 0, + d: element.d || 1, + }), ...element, }));