2022-04-08 12:48:37 +09:00
|
|
|
import InstantRestart from './InstantRestart/codegen.js';
|
2022-04-21 08:25:35 +09:00
|
|
|
import qft from './qft/codegen.js';
|
2023-02-01 02:49:55 +09:00
|
|
|
import qfst from './qfst/codegen.js';
|
2022-10-15 19:31:18 +09:00
|
|
|
import CustomizedDisplay from './CustomizedDisplay/codegen.js';
|
2022-10-30 04:19:16 +09:00
|
|
|
import PatternSelector from './PatternSelector/codegen.js';
|
2023-02-05 23:25:44 +09:00
|
|
|
import AttemptCounter from './AttemptCounter/codegen.js';
|
2023-02-06 04:35:42 +09:00
|
|
|
import controller from './controller/codegen.js';
|
2022-04-08 12:48:37 +09:00
|
|
|
|
|
|
|
export default {
|
|
|
|
InstantRestart,
|
2022-04-08 16:29:24 +09:00
|
|
|
qft,
|
2023-02-01 02:49:55 +09:00
|
|
|
qfst,
|
2022-10-15 19:31:18 +09:00
|
|
|
CustomizedDisplay,
|
2022-10-30 04:19:16 +09:00
|
|
|
PatternSelector,
|
2023-02-05 23:25:44 +09:00
|
|
|
AttemptCounter,
|
2023-02-06 04:35:42 +09:00
|
|
|
controller,
|
2022-04-08 12:48:37 +09:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param {string|null} s -- raw input string
|
|
|
|
*/
|
|
|
|
export function parseJSON(s) {
|
|
|
|
if (s == null) return null;
|
|
|
|
try {
|
|
|
|
return JSON.parse(s);
|
|
|
|
} catch {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|