New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

scorm-promised

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

scorm-promised

SCORM 1.2 API Wrapper

latest
Source
npmnpm
Version
1.1.8
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

SCORM API Wrapper

npm npm bundle size NPM

Currently WIP

This simple SCORM API wrapper is designed to give developers a simple interface to the SCORM 1.2 API. This library is small and simple. It is tree shaking friendly. Only import the functions you are using.

Installation

Install using npm and webpack/rollup etc.

npm install scorm-promised

Then functions can then be imported and used.

import { init, get, set } from 'scorm-promised';

Usage

init

Before using the library you must initialise the module. This will find the SCORM API in the window and begin the session.

import { init } from 'scorm-promised';

init().then(() => console.log('Init library'));

set

import { set } from 'scorm-promised';

set('cmi.suspend_data', 'example')
    .then(() => console.log('Value set'));

get

import { get } from 'scorm-promised';

get('cmi.suspend_data')
    .then(val => console.log(val));

terminate

import { terminate } from 'scorm-promised';

terminate().then(() => console.log('API Terminated'));

getErrorCode

import { getErrorCode } from 'scorm-promised';

getErrorCode().then(code => console.log(code));

FAQs

Package last updated on 03 Dec 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts