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

@lookit/lookit-initjspsych

v4.1.0

Published

This package overloads jsPsych's init function.

Readme

CHS's initJsPsych

Version History

This package contains the repackaging of jsPsych's initjsPsych function. We needed to give ourselves the ability to do two things:

  • Validate the trial timeline.
  • Record trial data to CHS's API.

chsInitJsPsych

This function will make available initJsPsych() and it can be expected to operate as the original.

initJsPsych = chsInitJsPsych(responseUuid);

The above code is already placed into the experiment before your code. For transparency, you can always find chsInitJsPsych() on npmjs, github, and unpkg. Please feel free to reach out with any questions or concerns.

Error tracking (Sentry)

When chsInitJsPsych() runs, it initializes Sentry for error tracking. This lets us catch and diagnose JavaScript errors that participants hit during a study.

Configuration is baked in at build time from the repo-root .env file (via the rollup-plugin-dotenv plugin):

| Variable | Description | | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | SENTRY_DSN | Sentry project DSN. If empty/unset, Sentry is not initialized so that local/dev builds can still run without it. | | SENTRY_ENVIRONMENT | Environment name, e.g. production or staging (this is currently always production, but we will implement the distinction later). | | SENTRY_RELEASE | Release identifier. Set automatically in the release workflow to the git commit SHA (which pins every package in this monorepo at once); optional (and empty) for local builds. |

Preview sessions are not tracked. Because study previews are how researchers develop and debug their own studies, any errors during a preview are often the researcher's own (a trial type that wasn't loaded, a typo in a hook, etc.) rather than a problem in CHS. When the session is a preview (is_preview), Sentry is not initialized at all so that researcher debugging doesn't flood the project with false alarms. However, if a CHS issue is suspected during development, the researcher/staff can always make the study "public" (but not discoverable) and run a non-preview session, which will produce Sentry error logs.

Only non-identifying context is sent to Sentry as tags: the study UUID and (public) study name, the response UUID, the hashed child id, and the preview flag. No family/child PII (names, birthdays, global IDs, etc.) is ever sent.

Session replay is configured to be privacy-preserving, which matters because CHS studies involve children:

  • All text is masked — on-screen text renders as blocked-out boxes in the replay.
  • All inputs are masked — anything typed (names, free-text answers) shows as ***.
  • All media is blocked — images, <video>, and canvas elements (including the child's webcam feed) are not captured and appear as empty placeholders.
  • Only sessions with an error are recorded — ordinary participant sessions are never recorded.