Registry / communication / pipwerks-scorm-api-wrapper

pipwerks-scorm-api-wrapper

JSON →
library0.1.2jsnpmunverified

Module wrapper for the Pipwerks SCORM API Wrapper, providing a clean ES6 module interface for LMS communication in e-learning content. Current version 0.1.2. Exposes SCORM object with init, get, set, save, quit methods plus debug and utilities. Intended for browser use in SCORM 1.2/2004 compliant LMS environments. Key differentiator: simplifies the original pipwerks API with ES module exports and npm distribution, avoiding global pollution.

npm install pipwerks-scorm-api-wrapper
INSTALL
IMPORT
SIG · PIPWERKS-SCORM-API
P
pipwerks-scorm-api-wrapper
communicationjavascriptv0.1.2
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

SCORM
import { SCORM } from 'pipwerks-scorm-api-wrapper';
import SCORM from 'pipwerks-scorm-api-wrapper';
Default import does not work; only named import is supported since v0.1.0.
UTILS
import { UTILS } from 'pipwerks-scorm-api-wrapper';
const { UTILS } = require('pipwerks-scorm-api-wrapper');
Package is ESM-only; CommonJS require is not supported.
pipwerks.SCORM
import { SCORM } from 'pipwerks-scorm-api-wrapper'; window.pipwerks = { SCORM };
import { pipwerks } from 'pipwerks-scorm-api-wrapper';
The package does not export the global pipwerks object; you must assign manually if needed for legacy code.

Shows basic SCORM workflow: initialize, get student name, set lesson status, save, and quit.

import { SCORM } from 'pipwerks-scorm-api-wrapper'; // Initialize connection with LMS SCORM.init(); // Get learner name const studentName = SCORM.get('cmi.core.student_name'); console.log('Student:', studentName); // Set lesson status to completed SCORM.set('cmi.core.lesson_status', 'completed'); // Save data to LMS SCORM.save(); // Terminate session SCORM.quit();
Debug
Known issues
gotchaSCORM.init() must be called before any get/set operations, typically on page load. Failing to do so results in silent failures.
fix
Call SCORM.init() at the beginning of your script; ensure the page is loaded in an LMS window.
affects: *
gotchaSCORM.get() returns empty string for undefined data model elements, not null or undefined. Compare against '' or check 'isAvailable'.
fix
Use SCORM.isAvailable() to confirm connection, or check result !== ''.
affects: *
breakingPackage is ESM-only (no CommonJS) since v0.1.0. Using require() throws 'ERR_REQUIRE_ESM' in Node.js.
fix
Use import syntax in ESM context, or ensure bundler (webpack, rollup) resolves the module.
affects: >=0.1.0
gotchaUTILS.StringToBoolean expects 'true'/'false' strings; passing numeric 0/1 or boolean true/false causes unexpected results.
fix
Always pass string 'true' or 'false'; for numbers, use Boolean(Number(value)).
affects: *
Errors
Common errors & fixes
TypeError: pipwerks is undefined
Attempting to access global pipwerks object from script that doesn't create it.
fix
Use import { SCORM } from 'pipwerks-scorm-api-wrapper'; then use SCORM directly instead of pipwerks.SCORM.
Error: ERR_REQUIRE_ESM
Using require() to load the ESM-only package.
fix
Switch to ES module import syntax: import { SCORM } from 'pipwerks-scorm-api-wrapper';
TypeError: SCORM.init is not a function
Incorrect import (default import instead of named).
fix
Use import { SCORM } from 'pipwerks-scorm-api-wrapper';
Upgrade
Version history
0.1.2latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
19 hits · last 30 days
node
16
OpenAI (training)
1
Resources
pipwerks-scorm-api-wrapper — npm install pipwerks-scorm-api-wrapper · libregistry