32 lines
No EOL
5.3 KiB
JavaScript
32 lines
No EOL
5.3 KiB
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
function initParseRuntime(converter) {
|
|
var params = converter.parseParam;
|
|
var rtn = {
|
|
needProcessIgnoreColumn: false,
|
|
needProcessIncludeColumn: false,
|
|
selectedColumns: undefined,
|
|
ended: false,
|
|
hasError: false,
|
|
error: undefined,
|
|
delimiter: converter.parseParam.delimiter,
|
|
eol: converter.parseParam.eol,
|
|
columnConv: [],
|
|
headerType: [],
|
|
headerTitle: [],
|
|
headerFlag: [],
|
|
headers: undefined,
|
|
started: false,
|
|
parsedLineNumber: 0,
|
|
columnValueSetter: [],
|
|
};
|
|
if (params.ignoreColumns) {
|
|
rtn.needProcessIgnoreColumn = true;
|
|
}
|
|
if (params.includeColumns) {
|
|
rtn.needProcessIncludeColumn = true;
|
|
}
|
|
return rtn;
|
|
}
|
|
exports.initParseRuntime = initParseRuntime;
|
|
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiL1VzZXJzL2t4aWFuZy93b3JrL3Byb2plY3RzL2NzdjJqc29uL3NyYy9QYXJzZVJ1bnRpbWUudHMiLCJzb3VyY2VzIjpbIi9Vc2Vycy9reGlhbmcvd29yay9wcm9qZWN0cy9jc3YyanNvbi9zcmMvUGFyc2VSdW50aW1lLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBOERBLDBCQUFpQyxTQUFvQjtJQUNuRCxJQUFNLE1BQU0sR0FBRyxTQUFTLENBQUMsVUFBVSxDQUFDO0lBQ3BDLElBQU0sR0FBRyxHQUFpQjtRQUN4Qix1QkFBdUIsRUFBRSxLQUFLO1FBQzlCLHdCQUF3QixFQUFFLEtBQUs7UUFDL0IsZUFBZSxFQUFFLFNBQVM7UUFDMUIsS0FBSyxFQUFFLEtBQUs7UUFDWixRQUFRLEVBQUUsS0FBSztRQUNmLEtBQUssRUFBRSxT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