New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@openlearning/xapi

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@openlearning/xapi - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

2

dist/xapi-activity-state.d.ts
import { XApiState } from "./lrs";
import { XApiConfig } from "./xapi-interface";
export declare const saveActivityState: (config: XApiConfig, stateId: string, state: XApiState) => Promise<boolean>;
export declare const retrieveActivityState: (config: XApiConfig, stateId: string) => Promise<any>;
export declare const retrieveActivityState: (config: XApiConfig, stateId: string, isNullOnNotFound?: boolean) => Promise<XApiState>;

@@ -15,3 +15,3 @@ "use strict";

exports.saveActivityState = saveActivityState;
const retrieveActivityState = (config, stateId) => {
const retrieveActivityState = (config, stateId, isNullOnNotFound = false) => {
if (!config) {

@@ -24,5 +24,15 @@ return Promise.reject({

const lrs = config.lrs;
return lrs.retrieveActivityState(config.activity_id, stateId, config.actor).then((response) => response.json());
return lrs.retrieveActivityState(config.activity_id, stateId, config.actor).then((response) => {
if (isNullOnNotFound && response.status === 404) {
return Promise.resolve(null);
}
else if (response.status !== 200) {
return Promise.reject(response);
}
else {
return response.json();
}
});
};
exports.retrieveActivityState = retrieveActivityState;
//# sourceMappingURL=xapi-activity-state.js.map
{
"name": "@openlearning/xapi",
"version": "0.1.1",
"version": "0.1.2",
"main": "dist/index.js",

@@ -5,0 +5,0 @@ "types": "dist/index.d.ts",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc