lab.js

20.2.4 • Public • Published

lab.js

Building blocks for browser-based behavioral experiments.


lab.js is a tool for constructing browser-based studies using a graphical builder interface, or through pure JavaScript code. This library is the code-based runtime that underpins all studies built using either method. You'll want to use it if you would like to program your study manually, or if you require the maximum possible flexibility. The graphical builder will get you started more quickly in most other cases.

Installation

Static builds are available with every release, and mirrored on unpkg.

If you use a package manager like npm or yarn, add lab.js to your project with one of the following commands:

$ npm install lab.js
$ yarn add lab.js # (alternatively)

Basic usage

The idea underlying this little library is that studies are assembled from individual components. The simplest example might be the following:

// Define a component
const hello = new lab.html.Screen({
  content: 'Hello world!'
})

// Run it
hello.run()

Each component can provide information to participants, as in the above example, or add structure to the study. Besides the content, components coordinate user events and collect data, providing the central functionality for any browser-based study. Every component can also be extended using hooks which allow custom code to be added at any point within the study.

Further information

A readme like this one can only provide the most general overview. Please find all further details in the following places ...

We welcome any questions or feedback you might have, and would like to warmly invite you to join our slack channel where we gladly answer your questions. Please subscribe to our newsletter for occasional updates.

Finally, we would love to have you as part of this project! Ideas and suggestions, bug reports and code contributions are all very welcome. This is an open project, and we'd be glad to get you started if you would like to help, but are unsure how.

Citation

We kindly request that you cite lab.js if you use it in your research. Here's how:

Henninger, F., Shevchenko, Y., Mertens, U. K., Kieslich, P. J., & Hilbig, B. E. (2019). lab.js: A free, open, online study builder. doi: 10.5281/zenodo.597045

(There are also version-specific dois if you prefer those)

Readme

Keywords

none

Package Sidebar

Install

npm i lab.js

Homepage

lab.js.org

Weekly Downloads

59

Version

20.2.4

License

Apache-2.0

Unpacked Size

14 MB

Total Files

83

Last publish

Collaborators

  • felixhenninger