scorm-wrapper
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

SCORM Wrapper

A TypeScript-based SCORM Wrapper for integrating SCORM functionality into your web applications.

Installation

npm install scorm-wrapper

Usage

1. Import the SCORM Wrapper

import SCORMWrapper from 'scorm-wrapper';

2. Initialize SCORM Connection

// Initialize SCORM connection
SCORMWrapper.init();

3. Get SCORM Data

const completionStatus = SCORMWrapper.get('cmi.completion_status');
console.log('Completion Status:', completionStatus);

4. Set SCORM Data

// Set completion status to 'completed'
SCORMWrapper.set('cmi.completion_status', 'completed');

5. Save SCORM Data

// Save changes
SCORMWrapper.save();

6. Terminate SCORM Connection

// Terminate SCORM connection
SCORMWrapper.quit();

API Reference

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.

Contributing

Feel free to contribute to this project by opening issues or submitting pull requests.

Package Sidebar

Install

npm i scorm-wrapper

Weekly Downloads

8

Version

0.0.1

License

MIT

Unpacked Size

91.5 kB

Total Files

9

Last publish

Collaborators

  • yachehbo