Search code examples
promisebluebird

How can I programmatically find Bluebird's version number?


I have a breakpoint right after bluebird = require('bluebird'), but I haven't been able to find any obvious property of the form bluebird.version.

In jQuery you do jQuery.fn.jquery, so maybe Bluebird does something weird like that?

Bluebird version 3.3.3

I found this snippet in their Github Promise.version = "__VERSION__";, but I haven't been able to access that.


Solution

  • Does the following work?

    console.log(require('bluebird/package.json').version);