A TypeScript-based SCORM Wrapper for integrating SCORM functionality into your web applications.
npm install scorm-wrapper
import SCORMWrapper from 'scorm-wrapper';
// Initialize SCORM connection
SCORMWrapper.init();
const completionStatus = SCORMWrapper.get('cmi.completion_status');
console.log('Completion Status:', completionStatus);
// Set completion status to 'completed'
SCORMWrapper.set('cmi.completion_status', 'completed');
// Save changes
SCORMWrapper.save();
// Terminate SCORM connection
SCORMWrapper.quit();
init()
Initialize the SCORM connection.
get(parameter: string): any
Get SCORM data for the specified parameter.
set(parameter: string, value: any): boolean
Set SCORM data for the specified parameter.
save(): boolean
Save changes made to SCORM data.
quit(): boolean
Terminate the SCORM connection.
Feel free to contribute to this project by opening issues or submitting pull requests.