According to the docs, in order to test the library as a node module one should use:
const nm = require(’nm-api’);
nm.init()
.then((service) => {
// do stuff with the instance
})
.catch((err) => {
console.error('Something went wrong when starting nm-api service', err);
});
However, doing so fails with a "TypeError: nm.init is not a function"

Rpi3 on 2019-04-08-raspbian-stretch-lite.img
Node: 10.15.3
npm: 6.9.0
According to the docs, in order to test the library as a node module one should use:
However, doing so fails with a "TypeError: nm.init is not a function"
Rpi3 on 2019-04-08-raspbian-stretch-lite.img
Node: 10.15.3
npm: 6.9.0