qb-answer-checker 1.1.7 → 1.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -1
- package/src/check-answer.d.ts +16 -9
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "qb-answer-checker",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.8",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A package to automatically check/judge answers against quizbowl answerlines.",
|
|
6
6
|
"main": "src/check-answer.js",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"build": "webpack",
|
|
9
|
+
"publish": "npm publish --access public",
|
|
9
10
|
"test": "node test/script.js"
|
|
10
11
|
},
|
|
11
12
|
"repository": {
|
package/src/check-answer.d.ts
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
export type CheckDirective = 'accept' | 'prompt' | 'reject';
|
|
2
|
+
|
|
3
|
+
export interface CheckResult {
|
|
4
|
+
directive: CheckDirective;
|
|
5
|
+
directedPrompt?: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
declare function checkAnswer(
|
|
9
|
+
answerline: string,
|
|
10
|
+
givenAnswer: string,
|
|
11
|
+
strictness?: number,
|
|
12
|
+
verbose?: boolean
|
|
13
|
+
): CheckResult;
|
|
14
|
+
|
|
15
|
+
export default checkAnswer;
|
|
16
|
+
export { checkAnswer };
|