jspsych 8.2.0 → 8.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -907,6 +907,7 @@ declare class JsPsych {
907
907
  data: JsPsychData;
908
908
  pluginAPI: PluginAPI;
909
909
  version(): string;
910
+ private citation;
910
911
  /** Options */
911
912
  private options;
912
913
  /** Experiment timeline */
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@ import autoBind from 'auto-bind';
2
2
  import rw from 'random-words';
3
3
  import seedrandom from 'seedrandom/lib/alea.js';
4
4
 
5
- var version = "8.2.0";
5
+ var version = "8.2.1";
6
6
 
7
7
  class ExtensionManager {
8
8
  constructor(dependencies, extensionsConfiguration) {
@@ -2310,6 +2310,11 @@ class JsPsych {
2310
2310
  this.turk = turk;
2311
2311
  this.randomization = randomization;
2312
2312
  this.utils = utils;
2313
+ // prettier-ignore
2314
+ this.citation = {
2315
+ "apa": "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://doi.org/10.21105/joss.05351 ",
2316
+ "bibtex": '@article{Leeuw2023jsPsych, author = {de Leeuw, Joshua R. and Gilbert, Rebecca A. and Luchterhandt, Bj{\\" o}rn}, journal = {Journal of Open Source Software}, doi = {10.21105/joss.05351}, issn = {2475-9066}, number = {85}, year = {2023}, month = {may 11}, pages = {5351}, publisher = {Open Journals}, title = {jsPsych: Enabling an {Open}-{Source} {Collaborative} {Ecosystem} of {Behavioral} {Experiments}}, url = {https://joss.theoj.org/papers/10.21105/joss.05351}, volume = {8}, } '
2317
+ };
2313
2318
  /** Options */
2314
2319
  this.options = {};
2315
2320
  /**
@@ -2529,17 +2534,13 @@ class JsPsych {
2529
2534
  */
2530
2535
  getCitations(plugins = [], format = "apa") {
2531
2536
  const formatOptions = ["apa", "bibtex"];
2532
- const jsPsychCitations = {
2533
- "apa": "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://doi.org/10.21105/joss.05351 ",
2534
- "bibtex": '@article{Leeuw2023jsPsych, author = {de Leeuw, Joshua R. and Gilbert, Rebecca A. and Luchterhandt, Bj{\\" o}rn}, journal = {Journal of Open Source Software}, doi = {10.21105/joss.05351}, issn = {2475-9066}, number = {85}, year = {2023}, month = {may 11}, pages = {5351}, publisher = {Open Journals}, title = {jsPsych: Enabling an {Open}-{Source} {Collaborative} {Ecosystem} of {Behavioral} {Experiments}}, url = {https://joss.theoj.org/papers/10.21105/joss.05351}, volume = {8}, } '
2535
- };
2536
2537
  format = format.toLowerCase();
2537
2538
  if (!Array.isArray(plugins)) {
2538
2539
  throw new Error("Expected array of plugins/extensions");
2539
2540
  } else if (!formatOptions.includes(format)) {
2540
2541
  throw new Error("Unsupported citation format");
2541
2542
  } else {
2542
- const jsPsychCitation = jsPsychCitations[format];
2543
+ const jsPsychCitation = this.citation[format];
2543
2544
  const citationSet = /* @__PURE__ */ new Set([jsPsychCitation]);
2544
2545
  for (const plugin of plugins) {
2545
2546
  try {