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 🙏

© 2024 – Pkg Stats / Ryan Hefner

nodus-ponens

v1.3.18

Published

A light, full-stack framework for running high-level reasoning and cognitive science experiments in Node.js.

Downloads

13

Readme

nodus-ponens

A light, full-stack framework for running high-level reasoning and cognitive science experiments in Node.js.

Bug fixes and updates

2024-07-29

  • Added progress bar display by default
  • Added ParticipantID processing in terminateDebrief.html
  • Added new CSS functionality to import font weights and add fixed-width font "Source Code Pro"

2023-11-03

  • Updated jQuery to latest version (3.7.1)
  • Updated jQuery UI to latest version (1.13.2)
  • Added middleware for accepting, logging, and returning data from third-party services (e.g., Qualtrics)

Preliminary Setup

$ sudo npm install -g shelljs       # nodus-ponens requires global installation of "shelljs"

Quick Start Guide

nodus-ponens is a full-stack framework for running high-level cognitive science experiments. It comes bundled with a fully-functional experiment template. To set the experiment up, run as follows:

$ mkdir temp
$ cd temp
$ npm install nodus-ponens
$ npm explore nodus-ponens -- npm run-script create-template
$ node main.js

The framework will launch a server-side monitoring console (in the terminal), and the experiment can then be viewed at http://localhost:55151. The default link to launch the study via a third-party service (e.g., Amazom Mechanical Turk) is: http://localhost:55151/launch. The link to launch the study via Qualtrics (which sends over specific information for logging and record-keeping), the link is: http://localhost:55151/qualtricsLaunch.

Usage

var path             = require("path");
var fs               = require('fs');
var staticDirectory  = path.resolve("static");              // Set directory of static HTML+CSS files
var dataDirectory    = path.resolve("data");              // Set directory where data will be written
var participantIndex = 0;                            // Start participant numbering at this value + 1

var np               = require("nodus-ponens")(participantIndex, staticDirectory, dataDirectory);
np.authors           = "Authors";
np.experimentName    = "Template1";
np.port              = 55151;

// Note: The user has to define the function np.loadStimuli() that is intended to take a
// participant's ID number (an integer) as input and return an array of objects representing the
// stimuli catered to that participant. The function allows users to define stimuli directly, read
// stimuli from an external file, or pull stimuli from other resources. In the template file included
// with the experiment (see Quick Start Guide above), the function "setupStimuli" serves this purpose
// by importing experimental stimuli from a CSV file. Supposing that the user successfully defines
// this function, the nodus-ponens setup proceeds as follows:

function setupStimuli(PID)          // Takes integer input and returns stimuli as set of JSON objects
{
   /* Write appropriate stimuli generation code here ... */
   return stimuli;             // To randomize the order of the stimuli, return np.randomize(stimuli)
}

np.loadStimuli = setupStimuli;
np.launchStudy();

License

(c) 2023 Sangeet Khemlani, http://www.khemlani.net/, Creative Commons License.