npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@adlete/client-ts

v0.0.2-beta

Published

A client plugin to connect typescript-based virtual learning environments to the adaptive engine @adlete/service.

Readme

@adlete/client-ts

A client plugin to connect typescript-based virtual learning environments to the adaption engine @adlete/service.

Example - Before the main trainings loop of your virtual learning environment starts

/* Before the main trainings loop */

/* Create a new instance of the service connection */
const adleteServiceConnection = new AdleteServiceConnection(this.token, this.host, 'arithmetic-game');

/* Check if the service is available. */
const {statusCode, statusDescription} = await adleteService.checkStatus();
if (statusCode !== 200) {
      console.error('Unable to connect to adlete service! Error message: ' + statusDescription);
}

/* If you do not have a learner create one and login. Otherwise just use login. */
const {statusInfo, learnerId} = await adleteService.createNewLearnerAndLogin();
if (statusInfo.statusCode !== 200) {
    console.error('Unable to create learner! Error message: ' + statusInfo.statusDescription);
}

/* Whenever the a new practicing session starts create a new session. */
const startedSession = await adleteService.startSession();
if (startedSession.StatusInfo.statusCode !== 200) {
    console.error('Unable to start session! Error message: ' + startedSession.StatusInfo.statusDescription);
}

Example - Within the main trainings loop of your virtual learning environment

/* Before your virtual learning environment creates each new exercises you can request *
 * a recommendation for a specific exercise type and difficulty level. Exercise types  *
 * and difficulty levels are described and can be defined via the @adlete/service.        */
const recommendation = await adleteService.fetchNextExerciseRecommendation();
if (recommendation.statusInfo.statusCode !== 200) {
    console.error('Unable to fetch recommendation! Error message: ' + recommendation.StatusInfo.statusDescription);
}

/* Create new exercise with the recommended exercises type/name and the difficulty level *
 * For example if your virtual learning environment supports the training of the basic   *
 * mathematic operation addition and subtraction this could look like this:              */
if(recommendation.nextExerciseName == "exerciseAddition") {
    console.log("Please calculate:")
    if(recommendation.nextExerciseDifficulty < 0.3) {
        console.log("1 + 1 = ?")
        generatedDifficulty
    } else if(recommendation.nextExerciseDifficulty < 0.6) {
        console.log("152 + 65 = ?")
    } else {
       console.log("1545206787 + 596 = ?")
    }
}
if(recommendation.nextExerciseName == "exerciseSubtraction") {
    //etc...
}

/* the user has given an answer and the given answer was validated. 1 = correct, 0 = incorrect */
const correctness = 1
/* define the difficulty level of your exercise. This is a balancing parameter, since your *
 * exercises would most like do not meet the actual difficulty level */
const generatedDifficulty = 0.5

const submitResults = await adleteService.submitResults(recommendation.nextExerciseName, recommendation.nextExerciseDifficulty, correctness, generatedDifficulty);
if (response.statusCode !== 200) {
    console.error('Unable to submit results! Error message: ' + recommendation.StatusInfo.statusDescription);
}

Example - After the main trainings loop of your virtual learning environment ended

const stopSessionResponse = await adleteService.stopSession();
if (stopSessionResponse.statusCode !== 200) {
    console.error('Unable to stop session! Error message: ' + stopSessionResponse.StatusInfo.statusDescription);
}

Development

Dependencies

Install package dependencies

yarn install

Building code

This package uses Typescript.

# clean and build
yarn build

# watch and build
yarn watch:build

Building documentation

yarn build:docs

IDE

Editorconfig

This package uses Editorconfig.

Linting

This package uses a prettier configuration to set a style format for all source code files, we ship this config in the package @adlete/dev-config.

Version Control

Use the bluejava git commit message guide.