Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public create(path: string) {
const SerialPortNamespace = require('@serialport/stream');
const MockBinding = require('@serialport/binding-mock');
SerialPortNamespace.Binding = MockBinding;
MockBinding.createPort(path, { echo: true, record: true });
}