Initial commit
This commit is contained in:
17
node_modules/@serialport/bindings-cpp/dist/win32-sn-parser.js
generated
vendored
Normal file
17
node_modules/@serialport/bindings-cpp/dist/win32-sn-parser.js
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.serialNumParser = void 0;
|
||||
const PARSERS = [/USB\\(?:.+)\\(.+)/, /FTDIBUS\\(?:.+)\+(.+?)A?\\.+/];
|
||||
const serialNumParser = (pnpId) => {
|
||||
if (!pnpId) {
|
||||
return null;
|
||||
}
|
||||
for (const parser of PARSERS) {
|
||||
const sn = pnpId.match(parser);
|
||||
if (sn) {
|
||||
return sn[1];
|
||||
}
|
||||
}
|
||||
return null;
|
||||
};
|
||||
exports.serialNumParser = serialNumParser;
|
||||
Reference in New Issue
Block a user