I have installed the package
npm install local-devices
and imported it in angular.json as 
"scripts": [
    "./node_modules/local-devices/index.js"
]
and declared as global variable in src/typings.d.ts
declare let findLocalDevices: any
Below, package files structure and index.js of local-devices package


then tried to use it in a component as
console.log(findLocalDevices())
but got error
findLocalDevices is not defined
How to import it, please guide!!!
import * as findLocalDevices from 'local-devices'
and inside any method use it as
ngOnInit() {
   console.log(findLocalDevices());
}
you may require to install other packages also os child_process / mz
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With