@waiting/bankcard-reader-base
Version:
13 lines (11 loc) • 1.06 kB
JavaScript
/**
* @waiting/bankcard-reader-base
* 读取IC/RF银行卡基础包
*
* @version 1.3.0
* @author waiting
* @license MIT
* @link https://github.com/waitingsong/node-bankcard-reader-base#readme
*/
import{normalize as r}from"@waiting/shared-core";const e={appDir:""},t={cardType:"auto",dllTxt:"",dllSearchPath:"",findCardRetryTimes:0,debug:!1,port:0,searchAll:!1};function a(e){const a=Object.assign({},t);if(!e.dllTxt)throw new Error("params dllTxt undefined or blank");return a.dllTxt=r(e.dllTxt),"string"==typeof e.dllSearchPath&&e.dllSearchPath&&(a.dllSearchPath=e.dllSearchPath),"boolean"==typeof e.debug&&(a.debug=e.debug),"boolean"==typeof e.searchAll&&(a.searchAll=e.searchAll),"number"==typeof e.findCardRetryTimes&&(a.findCardRetryTimes=e.findCardRetryTimes),(isNaN(a.findCardRetryTimes)||a.findCardRetryTimes<0)&&(a.findCardRetryTimes=t.findCardRetryTimes),"number"==typeof e.port&&e.port>0&&(a.port=e.port),a}e.appDir=__dirname+"/..";export{e as initialConfig,t as initialOpts,a as parseDeviceOpts};
//# sourceMappingURL=index.esm.min.js.map