@sparted/shared-library 1.7.87 → 1.7.88
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/chrono/get-approximated-session-time.d.ts +2 -0
- package/chrono/get-approximated-session-time.js +6 -1
- package/chrono/get-approximated-session-time.js.map +1 -1
- package/chrono/index.js +2 -0
- package/chrono/index.js.map +1 -1
- package/index.js +2 -0
- package/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
import { type GameType } from '../business/types';
|
|
2
|
+
export declare const DOLPHIN_AVERAGE_CHRONO_GAMEPLAY: number;
|
|
2
3
|
export declare const getApproximatedSessionTime: (gameTypes: GameType[]) => number;
|
|
4
|
+
export declare const getAverageSessionTime: (gameCount: number) => number;
|
|
@@ -11,13 +11,18 @@ const DOLPHIN_CHRONO_GAMEPLAY = {
|
|
|
11
11
|
'swiping-cards': 15 * 1000,
|
|
12
12
|
'ordering-cards': 20 * 1000 + 10000,
|
|
13
13
|
};
|
|
14
|
+
const DOLPHIN_AVERAGE_CHRONO_GAMEPLAY = Object.values(DOLPHIN_CHRONO_GAMEPLAY).reduce((sum, time) => sum + time, 0) /
|
|
15
|
+
Object.keys(DOLPHIN_CHRONO_GAMEPLAY).length;
|
|
14
16
|
const getApproximatedSessionTime = (gameTypes) => {
|
|
15
17
|
const time = gameTypes.reduce((sessionTime, gameType) => {
|
|
16
18
|
const gameplayTime = DOLPHIN_CHRONO_GAMEPLAY[gameType];
|
|
17
19
|
return sessionTime + gameplayTime;
|
|
18
20
|
}, 0);
|
|
19
21
|
return time;
|
|
20
|
-
};
|
|
22
|
+
};
|
|
23
|
+
const getAverageSessionTime = (gameCount) => gameCount * DOLPHIN_AVERAGE_CHRONO_GAMEPLAY;
|
|
21
24
|
|
|
25
|
+
exports.DOLPHIN_AVERAGE_CHRONO_GAMEPLAY = DOLPHIN_AVERAGE_CHRONO_GAMEPLAY;
|
|
22
26
|
exports.getApproximatedSessionTime = getApproximatedSessionTime;
|
|
27
|
+
exports.getAverageSessionTime = getAverageSessionTime;
|
|
23
28
|
//# sourceMappingURL=get-approximated-session-time.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-approximated-session-time.js","sources":["../../src/chrono/get-approximated-session-time.ts"],"sourcesContent":["import { type GameType } from '../business/types';\n\nconst DOLPHIN_CHRONO_GAMEPLAY = {\n mcq: 27 * 1000,\n 'error-text': 27 * 1000,\n 'no-interaction': 20000,\n 'picture-spot': 15 * 1000,\n 'open-question': 73 * 1000,\n 'swiping-cards': 15 * 1000,\n 'ordering-cards': 20 * 1000 + 10000,\n};\n\nexport const getApproximatedSessionTime = (gameTypes: GameType[]) => {\n const time = gameTypes.reduce<number>((sessionTime, gameType) => {\n const gameplayTime = DOLPHIN_CHRONO_GAMEPLAY[gameType];\n\n return sessionTime + gameplayTime;\n }, 0);\n\n return time;\n};\n"],"names":[],"mappings":";;;;AAEA,MAAM,uBAAuB,GAAG;IAC9B,GAAG,EAAE,EAAE,GAAG,IAAI;IACd,YAAY,EAAE,EAAE,GAAG,IAAI;AACvB,IAAA,gBAAgB,EAAE,KAAK;IACvB,cAAc,EAAE,EAAE,GAAG,IAAI;IACzB,eAAe,EAAE,EAAE,GAAG,IAAI;IAC1B,eAAe,EAAE,EAAE,GAAG,IAAI;AAC1B,IAAA,gBAAgB,EAAE,EAAE,GAAG,IAAI,GAAG,KAAK;CACpC,CAAC;AAEW,MAAA,0BAA0B,GAAG,CAAC,SAAqB,KAAI;IAClE,MAAM,IAAI,GAAG,SAAS,CAAC,MAAM,CAAS,CAAC,WAAW,EAAE,QAAQ,KAAI;AAC9D,QAAA,MAAM,YAAY,GAAG,uBAAuB,CAAC,QAAQ,CAAC,CAAC;QAEvD,OAAO,WAAW,GAAG,YAAY,CAAC;KACnC,EAAE,CAAC,CAAC,CAAC;AAEN,IAAA,OAAO,IAAI,CAAC;AACd
|
|
1
|
+
{"version":3,"file":"get-approximated-session-time.js","sources":["../../src/chrono/get-approximated-session-time.ts"],"sourcesContent":["import { type GameType } from '../business/types';\n\nconst DOLPHIN_CHRONO_GAMEPLAY = {\n mcq: 27 * 1000,\n 'error-text': 27 * 1000,\n 'no-interaction': 20000,\n 'picture-spot': 15 * 1000,\n 'open-question': 73 * 1000,\n 'swiping-cards': 15 * 1000,\n 'ordering-cards': 20 * 1000 + 10000,\n};\n\nexport const DOLPHIN_AVERAGE_CHRONO_GAMEPLAY =\n Object.values(DOLPHIN_CHRONO_GAMEPLAY).reduce<number>((sum, time) => sum + time, 0) /\n Object.keys(DOLPHIN_CHRONO_GAMEPLAY).length;\n\nexport const getApproximatedSessionTime = (gameTypes: GameType[]) => {\n const time = gameTypes.reduce<number>((sessionTime, gameType) => {\n const gameplayTime = DOLPHIN_CHRONO_GAMEPLAY[gameType];\n\n return sessionTime + gameplayTime;\n }, 0);\n\n return time;\n};\n\nexport const getAverageSessionTime = (gameCount: number) => gameCount * DOLPHIN_AVERAGE_CHRONO_GAMEPLAY;\n"],"names":[],"mappings":";;;;AAEA,MAAM,uBAAuB,GAAG;IAC9B,GAAG,EAAE,EAAE,GAAG,IAAI;IACd,YAAY,EAAE,EAAE,GAAG,IAAI;AACvB,IAAA,gBAAgB,EAAE,KAAK;IACvB,cAAc,EAAE,EAAE,GAAG,IAAI;IACzB,eAAe,EAAE,EAAE,GAAG,IAAI;IAC1B,eAAe,EAAE,EAAE,GAAG,IAAI;AAC1B,IAAA,gBAAgB,EAAE,EAAE,GAAG,IAAI,GAAG,KAAK;CACpC,CAAC;AAEW,MAAA,+BAA+B,GAC1C,MAAM,CAAC,MAAM,CAAC,uBAAuB,CAAC,CAAC,MAAM,CAAS,CAAC,GAAG,EAAE,IAAI,KAAK,GAAG,GAAG,IAAI,EAAE,CAAC,CAAC;AACnF,IAAA,MAAM,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC,OAAO;AAEjC,MAAA,0BAA0B,GAAG,CAAC,SAAqB,KAAI;IAClE,MAAM,IAAI,GAAG,SAAS,CAAC,MAAM,CAAS,CAAC,WAAW,EAAE,QAAQ,KAAI;AAC9D,QAAA,MAAM,YAAY,GAAG,uBAAuB,CAAC,QAAQ,CAAC,CAAC;QAEvD,OAAO,WAAW,GAAG,YAAY,CAAC;KACnC,EAAE,CAAC,CAAC,CAAC;AAEN,IAAA,OAAO,IAAI,CAAC;AACd,EAAE;AAEK,MAAM,qBAAqB,GAAG,CAAC,SAAiB,KAAK,SAAS,GAAG;;;;;;"}
|
package/chrono/index.js
CHANGED
|
@@ -6,5 +6,7 @@ var getApproximatedSessionTime = require('./get-approximated-session-time.js');
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
+
exports.DOLPHIN_AVERAGE_CHRONO_GAMEPLAY = getApproximatedSessionTime.DOLPHIN_AVERAGE_CHRONO_GAMEPLAY;
|
|
9
10
|
exports.getApproximatedSessionTime = getApproximatedSessionTime.getApproximatedSessionTime;
|
|
11
|
+
exports.getAverageSessionTime = getApproximatedSessionTime.getAverageSessionTime;
|
|
10
12
|
//# sourceMappingURL=index.js.map
|
package/chrono/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
|
package/index.js
CHANGED
|
@@ -57,7 +57,9 @@ exports.valuesFromKeys = getValuesFromKeys.valuesFromKeys;
|
|
|
57
57
|
exports.leftOutterJoin = leftOutterJoin.leftOutterJoin;
|
|
58
58
|
exports.innerJoin = innerJoin.innerJoin;
|
|
59
59
|
exports.createCdn = cdn_factory.createCdn;
|
|
60
|
+
exports.DOLPHIN_AVERAGE_CHRONO_GAMEPLAY = getApproximatedSessionTime.DOLPHIN_AVERAGE_CHRONO_GAMEPLAY;
|
|
60
61
|
exports.getApproximatedSessionTime = getApproximatedSessionTime.getApproximatedSessionTime;
|
|
62
|
+
exports.getAverageSessionTime = getApproximatedSessionTime.getAverageSessionTime;
|
|
61
63
|
exports.MS_DAY = constants.MS_DAY;
|
|
62
64
|
exports.MS_HOUR = constants.MS_HOUR;
|
|
63
65
|
exports.MS_MINUTE = constants.MS_MINUTE;
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|