Installations
npm install @jspsych/plugin-preload
Releases
@jspsych/plugin-audio-button-response@2.0.2
Published on 21 Nov 2024
jspsych@8.1.0
Published on 21 Nov 2024
@jspsych/plugin-sketchpad@2.0.2
Published on 13 Nov 2024
@jspsych/plugin-maxdiff@2.0.2
Published on 13 Nov 2024
@jspsych/plugin-instructions@2.0.1
Published on 13 Nov 2024
@jspsych/plugin-free-sort@2.0.2
Published on 13 Nov 2024
Developer
Developer Guide
Module System
ESM
Min. Node Version
Typescript Support
No
Node Version
20.15.0
NPM Version
10.7.0
Statistics
1,046 Stars
3,696 Commits
679 Forks
42 Watching
22 Branches
86 Contributors
Updated on 28 Nov 2024
Languages
TypeScript (95.29%)
HTML (2.3%)
JavaScript (1.88%)
SCSS (0.53%)
Total Downloads
Cumulative downloads
Total Downloads
141,957
Last day
28%
160
Compared to previous day
Last week
25.8%
1,381
Compared to previous week
Last month
-20.2%
6,142
Compared to previous month
Last year
81.4%
75,354
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Peer Dependencies
1
jsPsych is a JavaScript framework for creating behavioral experiments that run in a web browser.
Experiments in jsPsych are created using plugins. Each plugin defines different kinds of events, like showing an image on the screen, and collects different kinds of data, like recording which key was pressed at which time. By assembling different plugins together into a timeline, it is possible to create a wide range of online experiments.
What can I do with jsPsych?
jsPsych comes with a number of plugins that you can use create tasks and collect data. Some plugins do general things, like present a stimulus (text, image, audio, video) and record a key press or button response along with a response time. Other plugins do more specific things, like show a set of instructions pages, run a drag-and-drop image sorting task, or calibrate the WebGazer eye-tracking extension. See the list of all plugins to see what each plugin can do.
Often people can create their experiment by combining these plugins together. But if that's not possible for your experiment, you can also modify a plugin file or create your own plugin. This gives you the flexibility to do exactly what you want, while still taking advantage of jsPsych's general experiment-building framework. The plugin template is extremely flexible. If a task is possible to do in a web browser, you can almost certainly implement it as a plugin.
Getting started
jsPsych can be loaded into a project in a variety of ways, including via CDNs and through NPM. You can learn more about setting up a project by following the hello world tutorial on the jsPsych website.
Once you've got a project set up, the reaction time task tutorial is a great next step, since it covers many core topics and features.
There are also a number of video tutorials available on the website.
Examples
Several example experiments and plugin demonstrations are available in the /examples
folder.
After you've downloaded the latest release, double-click on an example HTML file to run it in your web browser, and open it with a programming-friendly text editor to see how it works.
Documentation
Documentation is available at https://www.jspsych.org.
Getting help
For questions about using the library, please use the GitHub discussions forum. You can also browse through the history of Q&A on the forum to find related questions.
Contributing
We :heart: contributions! See the contributing to jsPsych documentation page for more information about how you can help.
Citation
If you use this library in academic work, the preferred citation is:
de Leeuw, J.R., Gilbert, R.A., & Luchterhandt, B. (2023). jsPsych: Enabling an open-source collaborative ecosystem of behavioral experiments. Journal of Open Source Software, 8(85), 5351, https://joss.theoj.org/papers/10.21105/joss.05351.
This paper is an updated description of jsPsych and includes all current core team members. It replaces the earlier paper that described jsPsych:
de Leeuw, J.R. (2015). jsPsych: A JavaScript library for creating behavioral experiments in a Web browser. Behavior Research Methods, 47(1), 1-12. doi:10.3758/s13428-014-0458-y
Citations help us demonstrate that this library is used and valued, which allows us to continue working on it.
Contributors
jsPsych is open source project with numerous contributors. The project is currently managed by the core team of Josh de Leeuw (@jodeleeuw), Becky Gilbert (@becky-gilbert), and Björn Luchterhandt (@bjoluc).
jsPsych was created by Josh de Leeuw.
We're also grateful for the generous support from a Mozilla Open Source Support award, which funded development of the library from 2020-2022.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
all changesets reviewed
Reason
30 commit(s) and 11 issue activity found in the last 90 days -- score normalized to 10
Reason
license file detected
Details
- Info: project has a license file: license.txt:0
- Info: FSF or OSI recognized license: MIT License: license.txt:0
Reason
no binaries found in the repo
Reason
dependency not pinned by hash detected -- score normalized to 3
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/jspsych/jsPsych/build.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/jspsych/jsPsych/build.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/jspsych/jsPsych/build.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish-docs.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/jspsych/jsPsych/publish-docs.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish-docs.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/jspsych/jsPsych/publish-docs.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish-docs.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/jspsych/jsPsych/publish-docs.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish-docs.yml:45: update your workflow using https://app.stepsecurity.io/secureworkflow/jspsych/jsPsych/publish-docs.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/jspsych/jsPsych/release.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/jspsych/jsPsych/release.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/jspsych/jsPsych/release.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:49: update your workflow using https://app.stepsecurity.io/secureworkflow/jspsych/jsPsych/release.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:62: update your workflow using https://app.stepsecurity.io/secureworkflow/jspsych/jsPsych/release.yml/main?enable=pin
- Info: 0 out of 10 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 2 third-party GitHubAction dependencies pinned
- Info: 2 out of 2 npmCommand dependencies pinned
Reason
9 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm
- Warn: Project is vulnerable to: GHSA-g3ch-rx76-35fx
- Warn: Project is vulnerable to: GHSA-4vvj-4cpr-p986
- Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q
- Warn: Project is vulnerable to: GHSA-248v-346w-9cwc
- Warn: Project is vulnerable to: GHSA-34jh-p97f-mpxf
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/build.yml:1
- Warn: no topLevel permission defined: .github/workflows/publish-docs.yml:1
- Warn: no topLevel permission defined: .github/workflows/release.yml:1
- Info: no jobLevel write permissions found
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
Project has not signed or included provenance with any releases.
Details
- Warn: release artifact jspsych@8.1.0 not signed: https://api.github.com/repos/jspsych/jsPsych/releases/186641498
- Warn: release artifact @jspsych/plugin-sketchpad@2.0.2 not signed: https://api.github.com/repos/jspsych/jsPsych/releases/185195995
- Warn: release artifact @jspsych/plugin-maxdiff@2.0.2 not signed: https://api.github.com/repos/jspsych/jsPsych/releases/185195978
- Warn: release artifact @jspsych/plugin-instructions@2.0.1 not signed: https://api.github.com/repos/jspsych/jsPsych/releases/185195967
- Warn: release artifact jspsych@8.1.0 does not have provenance: https://api.github.com/repos/jspsych/jsPsych/releases/186641498
- Warn: release artifact @jspsych/plugin-sketchpad@2.0.2 does not have provenance: https://api.github.com/repos/jspsych/jsPsych/releases/185195995
- Warn: release artifact @jspsych/plugin-maxdiff@2.0.2 does not have provenance: https://api.github.com/repos/jspsych/jsPsych/releases/185195978
- Warn: release artifact @jspsych/plugin-instructions@2.0.1 does not have provenance: https://api.github.com/repos/jspsych/jsPsych/releases/185195967
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 30 are checked with a SAST tool
Score
4.7
/10
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More