How can I get version constant in p5.js?

basically what the title says - for debugging purpose I want to get the version as a constant variable. I checked each variable in “this” but didn’t get anything relevant matches /version/i

function setup() {
  createCanvas(400, 400);
  console.log(Object.keys(this).filter(s=>s.match(/version/i)))
}

function draw() {
  background(220);
}

By looking at https://editor.p5js.org/app.f1745ed387a63eb59417.js (the js file used by editor.p5js.org) it seems like 1.1.9 is only shown in two URLs, nowhere in the code.

And it’s in the first line of https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.1.9/p5.js

1 Like

thanks aBe, I didn’t expect to see a long thread without it still is not implemented :sweat:

1 Like

Congrats @micuat I see you have got it implemented in p5 1.3.1 as VERSION. Working well for me. That’s taken a long time, the p5 team didn’t see it as important.

1 Like

thanks :slight_smile: I mean people have different priorities. I hope this helps (maybe few but) some people!