@speleotica/frcsdata 4.0.3 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/FrcsPlotFile.d.ts +1 -1
  2. package/FrcsPlotShot.d.ts +1 -1
  3. package/FrcsShot.d.ts +1 -1
  4. package/FrcsShot.js +2 -3
  5. package/FrcsSurveyFile.d.ts +1 -1
  6. package/FrcsTrip.d.ts +2 -2
  7. package/FrcsTripSummary.d.ts +1 -1
  8. package/FrcsTripSummaryFile.d.ts +1 -1
  9. package/formatFrcsShot.js +7 -6
  10. package/index.js +11 -11
  11. package/node/index.js +6 -9
  12. package/package.json +30 -124
  13. package/parseFrcsPlotFile.js +4 -3
  14. package/parseFrcsSurveyFile.js +13 -12
  15. package/parseFrcsTripSummaryFile.js +5 -4
  16. package/string/index.js +8 -11
  17. package/web/index.d.ts +12 -0
  18. package/web/index.js +71 -0
  19. package/es/FrcsPlotFile.js +0 -6
  20. package/es/FrcsPlotShot.js +0 -6
  21. package/es/FrcsShot.js +0 -14
  22. package/es/FrcsSurveyFile.js +0 -6
  23. package/es/FrcsTrip.js +0 -6
  24. package/es/FrcsTripSummary.js +0 -6
  25. package/es/FrcsTripSummaryFile.js +0 -6
  26. package/es/formatFrcsShot.js +0 -75
  27. package/es/formatFrcsShot.spec.js +0 -141
  28. package/es/index.js +0 -96
  29. package/es/node/index.js +0 -20
  30. package/es/node/parseFrcsPlotFile.spec.js +0 -167
  31. package/es/node/parseFrcsSurveyFile.spec.js +0 -314
  32. package/es/node/parseFrcsTripSummaryFile.spec.js +0 -78
  33. package/es/parseFrcsPlotFile.js +0 -135
  34. package/es/parseFrcsSurveyFile.js +0 -503
  35. package/es/parseFrcsTripSummaryFile.js +0 -73
  36. package/es/string/index.js +0 -21
  37. package/es/string/parseFrcsPlotFile.spec.js +0 -179
  38. package/es/string/parseFrcsSurveyFile.spec.js +0 -646
  39. package/formatFrcsShot.spec.js +0 -139
  40. package/node/parseFrcsPlotFile.spec.js +0 -181
  41. package/node/parseFrcsSurveyFile.spec.js +0 -328
  42. package/node/parseFrcsTripSummaryFile.spec.js +0 -104
  43. package/string/parseFrcsPlotFile.spec.js +0 -182
  44. package/string/parseFrcsSurveyFile.spec.js +0 -673
  45. package/yarn.lock +0 -9542
package/FrcsPlotFile.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { UnitizedNumber, Length } from '@speleotica/unitized';
2
2
  import { FrcsPlotShot } from './FrcsPlotShot';
3
3
  import { SegmentParseError } from 'parse-segment';
4
- export declare type FrcsPlotFile = {
4
+ export type FrcsPlotFile = {
5
5
  totalLength: UnitizedNumber<Length>;
6
6
  shots: Array<FrcsPlotShot>;
7
7
  errors?: Array<SegmentParseError> | null;
package/FrcsPlotShot.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { UnitizedNumber, Length } from '@speleotica/unitized';
2
- export declare type FrcsPlotShot = {
2
+ export type FrcsPlotShot = {
3
3
  toName: string;
4
4
  isSurface?: boolean | null;
5
5
  fromNumber: number;
package/FrcsShot.d.ts CHANGED
@@ -4,7 +4,7 @@ export declare enum FrcsShotKind {
4
4
  Horizontal = "H",
5
5
  Diagonal = "D"
6
6
  }
7
- export declare type FrcsShot = {
7
+ export type FrcsShot = {
8
8
  /**
9
9
  * Name of from station
10
10
  */
package/FrcsShot.js CHANGED
@@ -4,10 +4,9 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.FrcsShotKind = void 0;
7
- var FrcsShotKind = /*#__PURE__*/function (FrcsShotKind) {
7
+ var FrcsShotKind = exports.FrcsShotKind = /*#__PURE__*/function (FrcsShotKind) {
8
8
  FrcsShotKind["Normal"] = " ";
9
9
  FrcsShotKind["Horizontal"] = "H";
10
10
  FrcsShotKind["Diagonal"] = "D";
11
11
  return FrcsShotKind;
12
- }({});
13
- exports.FrcsShotKind = FrcsShotKind;
12
+ }({});
@@ -1,6 +1,6 @@
1
1
  import { FrcsTrip } from './FrcsTrip';
2
2
  import { SegmentParseError } from 'parse-segment';
3
- export declare type FrcsSurveyFile = {
3
+ export type FrcsSurveyFile = {
4
4
  cave?: string | null;
5
5
  location?: string | null;
6
6
  comment?: string | null;
package/FrcsTrip.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Unit, Length, Angle } from '@speleotica/unitized';
2
2
  import { FrcsShot } from './FrcsShot';
3
- export declare type FrcsTripHeader = {
3
+ export type FrcsTripHeader = {
4
4
  name: string;
5
5
  comment?: string | null;
6
6
  section?: string | null;
@@ -14,7 +14,7 @@ export declare type FrcsTripHeader = {
14
14
  hasBacksightAzimuth?: boolean | null;
15
15
  hasBacksightInclination?: boolean | null;
16
16
  };
17
- export declare type FrcsTrip = {
17
+ export type FrcsTrip = {
18
18
  header: FrcsTripHeader;
19
19
  shots: Array<FrcsShot>;
20
20
  };
@@ -1,5 +1,5 @@
1
1
  import { UnitizedNumber, Length } from '@speleotica/unitized';
2
- export declare type FrcsTripSummary = {
2
+ export type FrcsTripSummary = {
3
3
  tripNumber: number;
4
4
  tripIndex: number;
5
5
  date: Date;
@@ -1,6 +1,6 @@
1
1
  import { FrcsTripSummary } from './FrcsTripSummary';
2
2
  import { SegmentParseError } from 'parse-segment';
3
- export declare type FrcsTripSummaryFile = {
3
+ export type FrcsTripSummaryFile = {
4
4
  errors?: Array<SegmentParseError> | null;
5
5
  tripSummaries: Array<FrcsTripSummary | undefined>;
6
6
  };
package/formatFrcsShot.js CHANGED
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports["default"] = formatFrcsShot;
7
- var _FrcsShot = require("./FrcsShot");
7
+ var _FrcsShot = require("./FrcsShot.js");
8
8
  var _unitized = require("@speleotica/unitized");
9
9
  var STATION_WIDTH = 5;
10
10
  var EMPTY_STATION = ' '.repeat(STATION_WIDTH);
@@ -53,20 +53,21 @@ function formatInches(distance) {
53
53
  return formatNumber(INCHES_WIDTH)(Math.round(distance.get(_unitized.Length.inches) % 12));
54
54
  }
55
55
  function formatFrcsShot(shot, header) {
56
- var _shot$frontsightAzimu, _shot$backsightAzimut, _shot$frontsightIncli, _shot$verticalDistanc, _shot$backsightInclin, _shot$toLruds, _shot$toLruds$left, _shot$toLruds2, _shot$toLruds2$right, _shot$toLruds3, _shot$toLruds3$up, _shot$toLruds4, _shot$toLruds4$down;
56
+ var _shot$frontsightAzimu, _shot$backsightAzimut, _shot$frontsightIncli, _shot$verticalDistanc, _shot$backsightInclin, _shot$toLruds, _shot$toLruds2, _shot$toLruds3, _shot$toLruds4;
57
57
  var azimuthUnit = header.azimuthUnit,
58
58
  inclinationUnit = header.inclinationUnit;
59
59
  var distanceUnit = header.distanceUnit;
60
60
  var inches = distanceUnit === _unitized.Length.inches;
61
61
  if (inches) distanceUnit = _unitized.Length.feet;
62
62
  if (!shot.to) {
63
- var _shot$fromLruds, _shot$fromLruds$left, _shot$fromLruds2, _shot$fromLruds2$righ, _shot$fromLruds3, _shot$fromLruds3$up, _shot$fromLruds4, _shot$fromLruds4$down;
63
+ var _shot$fromLruds, _shot$fromLruds2, _shot$fromLruds3, _shot$fromLruds4;
64
64
  return [formatStation(shot.from), EMPTY_STATION, EMPTY_DISTANCE, ' ',
65
65
  // kind
66
66
  ' ',
67
67
  // exclude
68
- EMPTY_AZIMUTH, EMPTY_AZIMUTH, EMPTY_INCLINATION, EMPTY_INCLINATION, formatLrud((_shot$fromLruds = shot.fromLruds) === null || _shot$fromLruds === void 0 ? void 0 : (_shot$fromLruds$left = _shot$fromLruds.left) === null || _shot$fromLruds$left === void 0 ? void 0 : _shot$fromLruds$left.get(distanceUnit)), formatLrud((_shot$fromLruds2 = shot.fromLruds) === null || _shot$fromLruds2 === void 0 ? void 0 : (_shot$fromLruds2$righ = _shot$fromLruds2.right) === null || _shot$fromLruds2$righ === void 0 ? void 0 : _shot$fromLruds2$righ.get(distanceUnit)), formatLrud((_shot$fromLruds3 = shot.fromLruds) === null || _shot$fromLruds3 === void 0 ? void 0 : (_shot$fromLruds3$up = _shot$fromLruds3.up) === null || _shot$fromLruds3$up === void 0 ? void 0 : _shot$fromLruds3$up.get(distanceUnit)), formatLrud((_shot$fromLruds4 = shot.fromLruds) === null || _shot$fromLruds4 === void 0 ? void 0 : (_shot$fromLruds4$down = _shot$fromLruds4.down) === null || _shot$fromLruds4$down === void 0 ? void 0 : _shot$fromLruds4$down.get(distanceUnit))].join('');
68
+ EMPTY_AZIMUTH, EMPTY_AZIMUTH, EMPTY_INCLINATION, EMPTY_INCLINATION, formatLrud((_shot$fromLruds = shot.fromLruds) === null || _shot$fromLruds === void 0 || (_shot$fromLruds = _shot$fromLruds.left) === null || _shot$fromLruds === void 0 ? void 0 : _shot$fromLruds.get(distanceUnit)), formatLrud((_shot$fromLruds2 = shot.fromLruds) === null || _shot$fromLruds2 === void 0 || (_shot$fromLruds2 = _shot$fromLruds2.right) === null || _shot$fromLruds2 === void 0 ? void 0 : _shot$fromLruds2.get(distanceUnit)), formatLrud((_shot$fromLruds3 = shot.fromLruds) === null || _shot$fromLruds3 === void 0 || (_shot$fromLruds3 = _shot$fromLruds3.up) === null || _shot$fromLruds3 === void 0 ? void 0 : _shot$fromLruds3.get(distanceUnit)), formatLrud((_shot$fromLruds4 = shot.fromLruds) === null || _shot$fromLruds4 === void 0 || (_shot$fromLruds4 = _shot$fromLruds4.down) === null || _shot$fromLruds4 === void 0 ? void 0 : _shot$fromLruds4.get(distanceUnit))].join('');
69
69
  }
70
70
  var distColumnValue = shot.kind === _FrcsShot.FrcsShotKind.Horizontal ? shot.horizontalDistance : shot.distance;
71
- return [formatStation(shot.to), formatStation(shot.from), inches ? formatFeet(distColumnValue) : formatDistance(distColumnValue === null || distColumnValue === void 0 ? void 0 : distColumnValue.get(distanceUnit)), inches ? formatInches(distColumnValue) : shot.kind, inches ? shot.kind : shot.excludeDistance ? '*' : ' ', formatAzimuth((_shot$frontsightAzimu = shot.frontsightAzimuth) === null || _shot$frontsightAzimu === void 0 ? void 0 : _shot$frontsightAzimu.get(azimuthUnit)), formatAzimuth((_shot$backsightAzimut = shot.backsightAzimuth) === null || _shot$backsightAzimut === void 0 ? void 0 : _shot$backsightAzimut.get(azimuthUnit)), shot.kind === _FrcsShot.FrcsShotKind.Normal ? formatInclination((_shot$frontsightIncli = shot.frontsightInclination) === null || _shot$frontsightIncli === void 0 ? void 0 : _shot$frontsightIncli.get(inclinationUnit)) : formatVerticalDistance((_shot$verticalDistanc = shot.verticalDistance) === null || _shot$verticalDistanc === void 0 ? void 0 : _shot$verticalDistanc.get(distanceUnit)), shot.kind === _FrcsShot.FrcsShotKind.Normal ? formatInclination((_shot$backsightInclin = shot.backsightInclination) === null || _shot$backsightInclin === void 0 ? void 0 : _shot$backsightInclin.get(inclinationUnit)) : EMPTY_INCLINATION, formatLrud((_shot$toLruds = shot.toLruds) === null || _shot$toLruds === void 0 ? void 0 : (_shot$toLruds$left = _shot$toLruds.left) === null || _shot$toLruds$left === void 0 ? void 0 : _shot$toLruds$left.get(distanceUnit)), formatLrud((_shot$toLruds2 = shot.toLruds) === null || _shot$toLruds2 === void 0 ? void 0 : (_shot$toLruds2$right = _shot$toLruds2.right) === null || _shot$toLruds2$right === void 0 ? void 0 : _shot$toLruds2$right.get(distanceUnit)), formatLrud((_shot$toLruds3 = shot.toLruds) === null || _shot$toLruds3 === void 0 ? void 0 : (_shot$toLruds3$up = _shot$toLruds3.up) === null || _shot$toLruds3$up === void 0 ? void 0 : _shot$toLruds3$up.get(distanceUnit)), formatLrud((_shot$toLruds4 = shot.toLruds) === null || _shot$toLruds4 === void 0 ? void 0 : (_shot$toLruds4$down = _shot$toLruds4.down) === null || _shot$toLruds4$down === void 0 ? void 0 : _shot$toLruds4$down.get(distanceUnit))].join('');
72
- }
71
+ return [formatStation(shot.to), formatStation(shot.from), inches ? formatFeet(distColumnValue) : formatDistance(distColumnValue === null || distColumnValue === void 0 ? void 0 : distColumnValue.get(distanceUnit)), inches ? formatInches(distColumnValue) : shot.kind, inches ? shot.kind : shot.excludeDistance ? '*' : ' ', formatAzimuth((_shot$frontsightAzimu = shot.frontsightAzimuth) === null || _shot$frontsightAzimu === void 0 ? void 0 : _shot$frontsightAzimu.get(azimuthUnit)), formatAzimuth((_shot$backsightAzimut = shot.backsightAzimuth) === null || _shot$backsightAzimut === void 0 ? void 0 : _shot$backsightAzimut.get(azimuthUnit)), shot.kind === _FrcsShot.FrcsShotKind.Normal ? formatInclination((_shot$frontsightIncli = shot.frontsightInclination) === null || _shot$frontsightIncli === void 0 ? void 0 : _shot$frontsightIncli.get(inclinationUnit)) : formatVerticalDistance((_shot$verticalDistanc = shot.verticalDistance) === null || _shot$verticalDistanc === void 0 ? void 0 : _shot$verticalDistanc.get(distanceUnit)), shot.kind === _FrcsShot.FrcsShotKind.Normal ? formatInclination((_shot$backsightInclin = shot.backsightInclination) === null || _shot$backsightInclin === void 0 ? void 0 : _shot$backsightInclin.get(inclinationUnit)) : EMPTY_INCLINATION, formatLrud((_shot$toLruds = shot.toLruds) === null || _shot$toLruds === void 0 || (_shot$toLruds = _shot$toLruds.left) === null || _shot$toLruds === void 0 ? void 0 : _shot$toLruds.get(distanceUnit)), formatLrud((_shot$toLruds2 = shot.toLruds) === null || _shot$toLruds2 === void 0 || (_shot$toLruds2 = _shot$toLruds2.right) === null || _shot$toLruds2 === void 0 ? void 0 : _shot$toLruds2.get(distanceUnit)), formatLrud((_shot$toLruds3 = shot.toLruds) === null || _shot$toLruds3 === void 0 || (_shot$toLruds3 = _shot$toLruds3.up) === null || _shot$toLruds3 === void 0 ? void 0 : _shot$toLruds3.get(distanceUnit)), formatLrud((_shot$toLruds4 = shot.toLruds) === null || _shot$toLruds4 === void 0 || (_shot$toLruds4 = _shot$toLruds4.down) === null || _shot$toLruds4 === void 0 ? void 0 : _shot$toLruds4.get(distanceUnit))].join('');
72
+ }
73
+ module.exports = exports.default;
package/index.js CHANGED
@@ -82,14 +82,14 @@ Object.defineProperty(exports, "parseFrcsTripSummaryFile", {
82
82
  return _parseFrcsTripSummaryFile["default"];
83
83
  }
84
84
  });
85
- var _FrcsTrip = require("./FrcsTrip");
86
- var _FrcsShot = require("./FrcsShot");
87
- var _FrcsSurveyFile = require("./FrcsSurveyFile");
88
- var _parseFrcsSurveyFile = _interopRequireDefault(require("./parseFrcsSurveyFile"));
89
- var _FrcsPlotShot = require("./FrcsPlotShot");
90
- var _FrcsPlotFile = require("./FrcsPlotFile");
91
- var _parseFrcsPlotFile = _interopRequireDefault(require("./parseFrcsPlotFile"));
92
- var _FrcsTripSummary = require("./FrcsTripSummary");
93
- var _FrcsTripSummaryFile = require("./FrcsTripSummaryFile");
94
- var _parseFrcsTripSummaryFile = _interopRequireDefault(require("./parseFrcsTripSummaryFile"));
95
- var _formatFrcsShot = _interopRequireDefault(require("./formatFrcsShot"));
85
+ var _FrcsTrip = require("./FrcsTrip.js");
86
+ var _FrcsShot = require("./FrcsShot.js");
87
+ var _FrcsSurveyFile = require("./FrcsSurveyFile.js");
88
+ var _parseFrcsSurveyFile = _interopRequireDefault(require("./parseFrcsSurveyFile.js"));
89
+ var _FrcsPlotShot = require("./FrcsPlotShot.js");
90
+ var _FrcsPlotFile = require("./FrcsPlotFile.js");
91
+ var _parseFrcsPlotFile = _interopRequireDefault(require("./parseFrcsPlotFile.js"));
92
+ var _FrcsTripSummary = require("./FrcsTripSummary.js");
93
+ var _FrcsTripSummaryFile = require("./FrcsTripSummaryFile.js");
94
+ var _parseFrcsTripSummaryFile = _interopRequireDefault(require("./parseFrcsTripSummaryFile.js"));
95
+ var _formatFrcsShot = _interopRequireDefault(require("./formatFrcsShot.js"));
package/node/index.js CHANGED
@@ -7,17 +7,14 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.parseFrcsTripSummaryFile = exports.parseFrcsSurveyFile = exports.parseFrcsPlotFile = void 0;
8
8
  var _fs = _interopRequireDefault(require("fs"));
9
9
  var _readline = _interopRequireDefault(require("readline"));
10
- var _parseFrcsSurveyFile2 = _interopRequireDefault(require("../parseFrcsSurveyFile"));
11
- var _parseFrcsPlotFile2 = _interopRequireDefault(require("../parseFrcsPlotFile"));
12
- var _parseFrcsTripSummaryFile2 = _interopRequireDefault(require("../parseFrcsTripSummaryFile"));
10
+ var _parseFrcsSurveyFile2 = _interopRequireDefault(require("../parseFrcsSurveyFile.js"));
11
+ var _parseFrcsPlotFile2 = _interopRequireDefault(require("../parseFrcsPlotFile.js"));
12
+ var _parseFrcsTripSummaryFile2 = _interopRequireDefault(require("../parseFrcsTripSummaryFile.js"));
13
13
  var convert = function convert(fn) {
14
14
  return function (file) {
15
15
  return fn(file, _readline["default"].createInterface(_fs["default"].createReadStream(file)));
16
16
  };
17
17
  };
18
- var parseFrcsSurveyFile = convert(_parseFrcsSurveyFile2["default"]);
19
- exports.parseFrcsSurveyFile = parseFrcsSurveyFile;
20
- var parseFrcsPlotFile = convert(_parseFrcsPlotFile2["default"]);
21
- exports.parseFrcsPlotFile = parseFrcsPlotFile;
22
- var parseFrcsTripSummaryFile = convert(_parseFrcsTripSummaryFile2["default"]);
23
- exports.parseFrcsTripSummaryFile = parseFrcsTripSummaryFile;
18
+ var parseFrcsSurveyFile = exports.parseFrcsSurveyFile = convert(_parseFrcsSurveyFile2["default"]);
19
+ var parseFrcsPlotFile = exports.parseFrcsPlotFile = convert(_parseFrcsPlotFile2["default"]);
20
+ var parseFrcsTripSummaryFile = exports.parseFrcsTripSummaryFile = convert(_parseFrcsTripSummaryFile2["default"]);
package/package.json CHANGED
@@ -1,75 +1,11 @@
1
1
  {
2
2
  "name": "@speleotica/frcsdata",
3
- "version": "4.0.3",
3
+ "version": "4.1.0",
4
4
  "description": "parser for Chip Hopper's survey data format used in Fisher Ridge Cave System",
5
- "main": "index.js",
6
5
  "sideEffects": false,
7
- "scripts": {
8
- "lint": "eslint $npm_package_config_lint",
9
- "lint:fix": "eslint $npm_package_config_lint",
10
- "lint:watch": "esw --watch $npm_package_config_lint",
11
- "prettier": "prettier --write .babelrc.js *.json *.md *.ts '{src,test}/**/*.{js,ts}'",
12
- "prettier:check": "prettier --list-different .babelrc.js *.json *.md *.ts '{src,test}/**/*.{js,ts}'",
13
- "tsc": "tsc --noEmit",
14
- "tsc:watch": "npm run tsc -- --watch",
15
- "clean": "rimraf es lib $(cd src; ls) *.js *.d.ts",
16
- "build": "npm run clean && npm run build:types && npm run build:js",
17
- "build:types": "tsc --emitDeclarationOnly",
18
- "build:js": "babel src --out-dir es --extensions \".ts\" --source-maps inline && cross-env BABEL_ENV=es5 babel src --out-dir . --extensions \".ts\"",
19
- "test": "cross-env NODE_ENV=test BABEL_ENV=es5 mocha $npm_package_config_mocha && cross-env NODE_ENV=test BABEL_ENV=coverage nyc --reporter=lcov --reporter=text mocha $npm_package_config_mocha",
20
- "test:watch": "cross-env NODE_ENV=test BABEL_ENV=test mocha $npm_package_config_mocha --watch --watch-extensions js,ts",
21
- "test:debug": "cross-env NODE_ENV=test BABEL_ENV=test mocha --inspect-brk $npm_package_config_mocha",
22
- "codecov": "nyc report --reporter=text-lcov > coverage.lcov; codecov",
23
- "prepublishOnly": "npm run clean && npm run prettier:check && npm run lint && npm test && npm run build",
24
- "open:coverage": "open coverage/lcov-report/index.html",
25
- "semantic-release": "semantic-release"
26
- },
27
- "config": {
28
- "lint": "--cache --ext .js,.ts src test",
29
- "mocha": "test/configure.js 'src/**/*.spec.ts'",
30
- "commitizen": {
31
- "path": "cz-conventional-changelog"
32
- }
33
- },
34
6
  "publishConfig": {
35
7
  "access": "public"
36
8
  },
37
- "husky": {
38
- "hooks": {
39
- "pre-commit": "lint-staged && npm run lint && npm run tsc",
40
- "commit-msg": "commitlint -e $GIT_PARAMS",
41
- "pre-push": "npm test"
42
- }
43
- },
44
- "lint-staged": {
45
- "*.{js,ts,json,css,md}": [
46
- "prettier --write",
47
- "git add"
48
- ]
49
- },
50
- "commitlint": {
51
- "extends": [
52
- "@jedwards1211/commitlint-config"
53
- ]
54
- },
55
- "prettier": {
56
- "semi": false,
57
- "singleQuote": true,
58
- "trailingComma": "es5"
59
- },
60
- "nyc": {
61
- "include": [
62
- "src/**/*.ts"
63
- ],
64
- "exclude": [
65
- "src/**/*.spec.ts"
66
- ],
67
- "require": [
68
- "@babel/register"
69
- ],
70
- "sourceMap": false,
71
- "instrument": false
72
- },
73
9
  "repository": {
74
10
  "type": "git",
75
11
  "url": "https://github.com/speleotica/frcsdata.git"
@@ -83,68 +19,38 @@
83
19
  "url": "https://github.com/speleotica/frcsdata/issues"
84
20
  },
85
21
  "homepage": "https://github.com/speleotica/frcsdata#readme",
86
- "devDependencies": {
87
- "@babel/cli": "^7.22.5",
88
- "@babel/core": "^7.22.5",
89
- "@babel/plugin-proposal-class-properties": "^7.18.6",
90
- "@babel/plugin-proposal-export-default-from": "^7.22.5",
91
- "@babel/plugin-proposal-export-namespace-from": "^7.18.9",
92
- "@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6",
93
- "@babel/plugin-proposal-object-rest-spread": "^7.20.7",
94
- "@babel/plugin-proposal-optional-chaining": "^7.21.0",
95
- "@babel/plugin-syntax-dynamic-import": "^7.0.0",
96
- "@babel/plugin-transform-runtime": "^7.22.5",
97
- "@babel/preset-env": "^7.22.5",
98
- "@babel/preset-typescript": "^7.22.5",
99
- "@babel/register": "^7.22.5",
100
- "@commitlint/cli": "^6.0.2",
101
- "@commitlint/config-conventional": "^6.0.2",
102
- "@jedwards1211/commitlint-config": "^1.0.0",
103
- "@jedwards1211/eslint-config-typescript": "^1.0.0",
104
- "@types/chai": "^4.2.0",
105
- "@types/mocha": "^5.2.7",
106
- "@types/node": "^12.12.12",
107
- "babel-eslint": "^10.1.0",
108
- "babel-plugin-istanbul": "^6.1.1",
109
- "chai": "^4.2.0",
110
- "codecov": "^3.1.0",
111
- "copy": "^0.3.2",
112
- "cross-env": "^5.2.0",
113
- "eslint": "^5.9.0",
114
- "eslint-config-prettier": "^3.3.0",
115
- "eslint-watch": "^4.0.2",
116
- "husky": "^1.1.4",
117
- "istanbul": "^0.4.5",
118
- "lint-staged": "^8.0.4",
119
- "mocha": "^6.2.1",
120
- "nyc": "^13.1.0",
121
- "prettier": "^1.15.2",
122
- "prettier-eslint": "^8.8.2",
123
- "rimraf": "^2.6.0",
124
- "semantic-release": "^15.13.31",
125
- "typescript": "^3.7.2"
126
- },
127
22
  "dependencies": {
128
- "@babel/runtime": "^7.1.5",
23
+ "@babel/runtime": "^7.18.6",
129
24
  "@speleotica/unitized": "^2.0.0",
130
25
  "parse-segment": "^1.5.1"
131
26
  },
132
- "renovate": {
133
- "extends": [
134
- ":separateMajorReleases",
135
- ":combinePatchMinorReleases",
136
- ":ignoreUnstable",
137
- ":prImmediately",
138
- ":renovatePrefix",
139
- ":updateNotScheduled",
140
- ":preserveSemverRanges",
141
- ":semanticPrefixFixDepsChoreOthers",
142
- ":automergeDisabled",
143
- "group:monorepos"
144
- ],
145
- "automerge": true,
146
- "major": {
147
- "automerge": false
27
+ "main": "index.js",
28
+ "types": "index.d.ts",
29
+ "exports": {
30
+ "./package.json": "./package.json",
31
+ ".": {
32
+ "types": "./index.d.ts",
33
+ "default": "./index.js"
34
+ },
35
+ "./node": {
36
+ "types": "./node/index.d.ts",
37
+ "default": "./node/index.js"
38
+ },
39
+ "./string": {
40
+ "types": "./string/index.d.ts",
41
+ "default": "./string/index.js"
42
+ },
43
+ "./web": {
44
+ "types": "./web/index.d.ts",
45
+ "default": "./web/index.js"
46
+ },
47
+ "./*": {
48
+ "types": "./*.d.ts",
49
+ "default": "./*.js"
148
50
  }
149
- }
51
+ },
52
+ "engines": {
53
+ "node": ">=16"
54
+ },
55
+ "packageManager": "pnpm@8.11.0"
150
56
  }
@@ -9,8 +9,8 @@ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"))
9
9
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
10
10
  var _unitized = require("@speleotica/unitized");
11
11
  var _parseSegment = require("parse-segment");
12
- function _asyncIterator(iterable) { var method, async, sync, retry = 2; for ("undefined" != typeof Symbol && (async = Symbol.asyncIterator, sync = Symbol.iterator); retry--;) { if (async && null != (method = iterable[async])) return method.call(iterable); if (sync && null != (method = iterable[sync])) return new AsyncFromSyncIterator(method.call(iterable)); async = "@@asyncIterator", sync = "@@iterator"; } throw new TypeError("Object is not async iterable"); }
13
- function AsyncFromSyncIterator(s) { function AsyncFromSyncIteratorContinuation(r) { if (Object(r) !== r) return Promise.reject(new TypeError(r + " is not an object.")); var done = r.done; return Promise.resolve(r.value).then(function (value) { return { value: value, done: done }; }); } return AsyncFromSyncIterator = function AsyncFromSyncIterator(s) { this.s = s, this.n = s.next; }, AsyncFromSyncIterator.prototype = { s: null, n: null, next: function next() { return AsyncFromSyncIteratorContinuation(this.n.apply(this.s, arguments)); }, "return": function _return(value) { var ret = this.s["return"]; return void 0 === ret ? Promise.resolve({ value: value, done: !0 }) : AsyncFromSyncIteratorContinuation(ret.apply(this.s, arguments)); }, "throw": function _throw(value) { var thr = this.s["return"]; return void 0 === thr ? Promise.reject(value) : AsyncFromSyncIteratorContinuation(thr.apply(this.s, arguments)); } }, new AsyncFromSyncIterator(s); }
12
+ function _asyncIterator(r) { var n, t, o, e = 2; for ("undefined" != typeof Symbol && (t = Symbol.asyncIterator, o = Symbol.iterator); e--;) { if (t && null != (n = r[t])) return n.call(r); if (o && null != (n = r[o])) return new AsyncFromSyncIterator(n.call(r)); t = "@@asyncIterator", o = "@@iterator"; } throw new TypeError("Object is not async iterable"); }
13
+ function AsyncFromSyncIterator(r) { function AsyncFromSyncIteratorContinuation(r) { if (Object(r) !== r) return Promise.reject(new TypeError(r + " is not an object.")); var n = r.done; return Promise.resolve(r.value).then(function (r) { return { value: r, done: n }; }); } return AsyncFromSyncIterator = function AsyncFromSyncIterator(r) { this.s = r, this.n = r.next; }, AsyncFromSyncIterator.prototype = { s: null, n: null, next: function next() { return AsyncFromSyncIteratorContinuation(this.n.apply(this.s, arguments)); }, "return": function _return(r) { var n = this.s["return"]; return void 0 === n ? Promise.resolve({ value: r, done: !0 }) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments)); }, "throw": function _throw(r) { var n = this.s["return"]; return void 0 === n ? Promise.reject(r) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments)); } }, new AsyncFromSyncIterator(r); }
14
14
  /**
15
15
  * Parses data from a calculated survey file. These look like so:
16
16
  <pre> 123.182259
@@ -264,4 +264,5 @@ function _parseFrcsPlotFile() {
264
264
  }, _callee, null, [[10, 70, 74, 84], [75,, 79, 83]]);
265
265
  }));
266
266
  return _parseFrcsPlotFile.apply(this, arguments);
267
- }
267
+ }
268
+ module.exports = exports.default;
@@ -10,9 +10,9 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
10
10
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
11
11
  var _parseSegment = require("parse-segment");
12
12
  var _unitized = require("@speleotica/unitized");
13
- var _FrcsShot = require("./FrcsShot");
14
- function _asyncIterator(iterable) { var method, async, sync, retry = 2; for ("undefined" != typeof Symbol && (async = Symbol.asyncIterator, sync = Symbol.iterator); retry--;) { if (async && null != (method = iterable[async])) return method.call(iterable); if (sync && null != (method = iterable[sync])) return new AsyncFromSyncIterator(method.call(iterable)); async = "@@asyncIterator", sync = "@@iterator"; } throw new TypeError("Object is not async iterable"); }
15
- function AsyncFromSyncIterator(s) { function AsyncFromSyncIteratorContinuation(r) { if (Object(r) !== r) return Promise.reject(new TypeError(r + " is not an object.")); var done = r.done; return Promise.resolve(r.value).then(function (value) { return { value: value, done: done }; }); } return AsyncFromSyncIterator = function AsyncFromSyncIterator(s) { this.s = s, this.n = s.next; }, AsyncFromSyncIterator.prototype = { s: null, n: null, next: function next() { return AsyncFromSyncIteratorContinuation(this.n.apply(this.s, arguments)); }, "return": function _return(value) { var ret = this.s["return"]; return void 0 === ret ? Promise.resolve({ value: value, done: !0 }) : AsyncFromSyncIteratorContinuation(ret.apply(this.s, arguments)); }, "throw": function _throw(value) { var thr = this.s["return"]; return void 0 === thr ? Promise.reject(value) : AsyncFromSyncIteratorContinuation(thr.apply(this.s, arguments)); } }, new AsyncFromSyncIterator(s); }
13
+ var _FrcsShot = require("./FrcsShot.js");
14
+ function _asyncIterator(r) { var n, t, o, e = 2; for ("undefined" != typeof Symbol && (t = Symbol.asyncIterator, o = Symbol.iterator); e--;) { if (t && null != (n = r[t])) return n.call(r); if (o && null != (n = r[o])) return new AsyncFromSyncIterator(n.call(r)); t = "@@asyncIterator", o = "@@iterator"; } throw new TypeError("Object is not async iterable"); }
15
+ function AsyncFromSyncIterator(r) { function AsyncFromSyncIteratorContinuation(r) { if (Object(r) !== r) return Promise.reject(new TypeError(r + " is not an object.")); var n = r.done; return Promise.resolve(r.value).then(function (r) { return { value: r, done: n }; }); } return AsyncFromSyncIterator = function AsyncFromSyncIterator(r) { this.s = r, this.n = r.next; }, AsyncFromSyncIterator.prototype = { s: null, n: null, next: function next() { return AsyncFromSyncIteratorContinuation(this.n.apply(this.s, arguments)); }, "return": function _return(r) { var n = this.s["return"]; return void 0 === n ? Promise.resolve({ value: r, done: !0 }) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments)); }, "throw": function _throw(r) { var n = this.s["return"]; return void 0 === n ? Promise.reject(r) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments)); } }, new AsyncFromSyncIterator(r); }
16
16
  function parseNumber(s, unit) {
17
17
  var value = parseFloat(s);
18
18
  if (isNaN(value)) return null;
@@ -167,7 +167,7 @@ function _parseFrcsSurveyFile() {
167
167
  _parseFrcsSurveyFile = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(file,
168
168
  // eslint-disable-line @typescript-eslint/no-explicit-any
169
169
  lines) {
170
- var cave, location, trips, errors, tripName, tripTeam, tripDate, inTripComment, tripCommentStartLine, tripCommentEndLine, tripComment, commentLines, trip, inBlockComment, section, commentFromStationLruds, addCommentLine, getComment, lineNumber, _iteratorAbruptCompletion, _didIteratorError, _iteratorError, _loop, _iterator, _step, _ret;
170
+ var cave, location, trips, errors, tripName, tripTeam, tripDate, inTripComment, tripCommentStartLine, tripCommentEndLine, tripComment, commentLines, trip, inBlockComment, section, commentFromStationLruds, addCommentLine, getComment, lineNumber, _iteratorAbruptCompletion, _didIteratorError, _iteratorError, _loop, _ret, _iterator, _step;
171
171
  return _regenerator["default"].wrap(function _callee$(_context2) {
172
172
  while (1) switch (_context2.prev = _context2.next) {
173
173
  case 0:
@@ -372,7 +372,7 @@ function _parseFrcsSurveyFile() {
372
372
  _context.next = 51;
373
373
  break;
374
374
  }
375
- return _context.abrupt("return", "continue");
375
+ return _context.abrupt("return", 0);
376
376
  case 51:
377
377
  fromStr = validate(5, 10, 'from station', isValidStation);
378
378
  from = fromStr.trim(); // Sadly I have found negative LRUD values in Chip's format and apparently
@@ -386,7 +386,7 @@ function _parseFrcsSurveyFile() {
386
386
  _context.next = 59;
387
387
  break;
388
388
  }
389
- return _context.abrupt("return", "continue");
389
+ return _context.abrupt("return", 0);
390
390
  case 59:
391
391
  up = parseLrud(uStr, _distanceUnit);
392
392
  down = parseLrud(dStr, _distanceUnit);
@@ -416,7 +416,7 @@ function _parseFrcsSurveyFile() {
416
416
  comment: getComment()
417
417
  };
418
418
  shots.push(_shot);
419
- return _context.abrupt("return", "continue");
419
+ return _context.abrupt("return", 0);
420
420
  case 68:
421
421
  if (!isValidStation(toStr)) {
422
422
  error('Invalid station name', 0, 5);
@@ -447,7 +447,7 @@ function _parseFrcsSurveyFile() {
447
447
  _context.next = 78;
448
448
  break;
449
449
  }
450
- return _context.abrupt("return", "continue");
450
+ return _context.abrupt("return", 0);
451
451
  case 78:
452
452
  if (!inches) {
453
453
  _context.next = 91;
@@ -461,7 +461,7 @@ function _parseFrcsSurveyFile() {
461
461
  }
462
462
  invalid = feetStr.trim() || inchesStr.trim();
463
463
  error(invalid ? 'Invalid distance' : 'Missing distance', 10, 17);
464
- return _context.abrupt("return", "continue");
464
+ return _context.abrupt("return", 0);
465
465
  case 85:
466
466
  // sometimes inches are omitted, hence the || 0...I'm assuming it's possible
467
467
  // for feet to be omitted as well
@@ -519,7 +519,7 @@ function _parseFrcsSurveyFile() {
519
519
  _context.next = 100;
520
520
  break;
521
521
  }
522
- return _context.abrupt("return", "continue");
522
+ return _context.abrupt("return", 0);
523
523
  case 100:
524
524
  frontsightAzimuth = parseAzimuth(azmFsStr, _azimuthUnit);
525
525
  backsightAzimuth = parseAzimuth(azmBsStr, _azimuthUnit);
@@ -567,7 +567,7 @@ function _parseFrcsSurveyFile() {
567
567
  return _context2.delegateYield(_loop(), "t0", 24);
568
568
  case 24:
569
569
  _ret = _context2.t0;
570
- if (!(_ret === "continue")) {
570
+ if (!(_ret === 0)) {
571
571
  _context2.next = 27;
572
572
  break;
573
573
  }
@@ -618,4 +618,5 @@ function _parseFrcsSurveyFile() {
618
618
  }, _callee, null, [[17, 32, 36, 46], [37,, 41, 45]]);
619
619
  }));
620
620
  return _parseFrcsSurveyFile.apply(this, arguments);
621
- }
621
+ }
622
+ module.exports = exports.default;
@@ -9,9 +9,9 @@ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"))
9
9
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
10
10
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
11
11
  var _unitized = require("@speleotica/unitized");
12
- function _asyncIterator(iterable) { var method, async, sync, retry = 2; for ("undefined" != typeof Symbol && (async = Symbol.asyncIterator, sync = Symbol.iterator); retry--;) { if (async && null != (method = iterable[async])) return method.call(iterable); if (sync && null != (method = iterable[sync])) return new AsyncFromSyncIterator(method.call(iterable)); async = "@@asyncIterator", sync = "@@iterator"; } throw new TypeError("Object is not async iterable"); }
13
- function AsyncFromSyncIterator(s) { function AsyncFromSyncIteratorContinuation(r) { if (Object(r) !== r) return Promise.reject(new TypeError(r + " is not an object.")); var done = r.done; return Promise.resolve(r.value).then(function (value) { return { value: value, done: done }; }); } return AsyncFromSyncIterator = function AsyncFromSyncIterator(s) { this.s = s, this.n = s.next; }, AsyncFromSyncIterator.prototype = { s: null, n: null, next: function next() { return AsyncFromSyncIteratorContinuation(this.n.apply(this.s, arguments)); }, "return": function _return(value) { var ret = this.s["return"]; return void 0 === ret ? Promise.resolve({ value: value, done: !0 }) : AsyncFromSyncIteratorContinuation(ret.apply(this.s, arguments)); }, "throw": function _throw(value) { var thr = this.s["return"]; return void 0 === thr ? Promise.reject(value) : AsyncFromSyncIteratorContinuation(thr.apply(this.s, arguments)); } }, new AsyncFromSyncIterator(s); }
14
- var tripSummaryRegex = /^\s*(\d+)\s+(\d{1,2})\/(\s\d|\d\d)\/(\d{2,4})\s+(\d+(?:\.\d*)?)\s+(\d+)\s+(\S.*)EXCLUDED:\s+(\d+(?:\.\d*)?)\s+(\d+)/;
12
+ function _asyncIterator(r) { var n, t, o, e = 2; for ("undefined" != typeof Symbol && (t = Symbol.asyncIterator, o = Symbol.iterator); e--;) { if (t && null != (n = r[t])) return n.call(r); if (o && null != (n = r[o])) return new AsyncFromSyncIterator(n.call(r)); t = "@@asyncIterator", o = "@@iterator"; } throw new TypeError("Object is not async iterable"); }
13
+ function AsyncFromSyncIterator(r) { function AsyncFromSyncIteratorContinuation(r) { if (Object(r) !== r) return Promise.reject(new TypeError(r + " is not an object.")); var n = r.done; return Promise.resolve(r.value).then(function (r) { return { value: r, done: n }; }); } return AsyncFromSyncIterator = function AsyncFromSyncIterator(r) { this.s = r, this.n = r.next; }, AsyncFromSyncIterator.prototype = { s: null, n: null, next: function next() { return AsyncFromSyncIteratorContinuation(this.n.apply(this.s, arguments)); }, "return": function _return(r) { var n = this.s["return"]; return void 0 === n ? Promise.resolve({ value: r, done: !0 }) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments)); }, "throw": function _throw(r) { var n = this.s["return"]; return void 0 === n ? Promise.reject(r) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments)); } }, new AsyncFromSyncIterator(r); }
14
+ var tripSummaryRegex = /^\s*(\d+)\s+(\d{1,2})\/(\s\d|\d\d)\/(\d{2,4})\s+(\d+(?:\.\d*)?)\s+(\d+)\s+(\S.*)EXCLUDED:\s*(\d+(?:\.\d{2})?)\s*(\d+)/;
15
15
  /**
16
16
  * Parses data from a STAT_sum.txt file. Here is an excerpt of the format:
17
17
  <pre> 1 2/15/81 258.60 17 ENTRANCE DROPS, JOE'S "I LOVE MY WIFE TRAVERSE", TRICKY TRAVERSE EXCLUDED: 0.00 0
@@ -137,4 +137,5 @@ function _parseFrcsTripSummaryFile() {
137
137
  }, _callee, null, [[8, 38, 42, 52], [43,, 47, 51]]);
138
138
  }));
139
139
  return _parseFrcsTripSummaryFile.apply(this, arguments);
140
- }
140
+ }
141
+ module.exports = exports.default;
package/string/index.js CHANGED
@@ -9,11 +9,11 @@ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"))
9
9
  var _wrapAsyncGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/wrapAsyncGenerator"));
10
10
  var _awaitAsyncGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/awaitAsyncGenerator"));
11
11
  var _asyncGeneratorDelegate2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncGeneratorDelegate"));
12
- var _parseFrcsSurveyFile2 = _interopRequireDefault(require("../parseFrcsSurveyFile"));
13
- var _parseFrcsPlotFile2 = _interopRequireDefault(require("../parseFrcsPlotFile"));
14
- var _parseFrcsTripSummaryFile2 = _interopRequireDefault(require("../parseFrcsTripSummaryFile"));
15
- function _asyncIterator(iterable) { var method, async, sync, retry = 2; for ("undefined" != typeof Symbol && (async = Symbol.asyncIterator, sync = Symbol.iterator); retry--;) { if (async && null != (method = iterable[async])) return method.call(iterable); if (sync && null != (method = iterable[sync])) return new AsyncFromSyncIterator(method.call(iterable)); async = "@@asyncIterator", sync = "@@iterator"; } throw new TypeError("Object is not async iterable"); }
16
- function AsyncFromSyncIterator(s) { function AsyncFromSyncIteratorContinuation(r) { if (Object(r) !== r) return Promise.reject(new TypeError(r + " is not an object.")); var done = r.done; return Promise.resolve(r.value).then(function (value) { return { value: value, done: done }; }); } return AsyncFromSyncIterator = function AsyncFromSyncIterator(s) { this.s = s, this.n = s.next; }, AsyncFromSyncIterator.prototype = { s: null, n: null, next: function next() { return AsyncFromSyncIteratorContinuation(this.n.apply(this.s, arguments)); }, "return": function _return(value) { var ret = this.s["return"]; return void 0 === ret ? Promise.resolve({ value: value, done: !0 }) : AsyncFromSyncIteratorContinuation(ret.apply(this.s, arguments)); }, "throw": function _throw(value) { var thr = this.s["return"]; return void 0 === thr ? Promise.reject(value) : AsyncFromSyncIteratorContinuation(thr.apply(this.s, arguments)); } }, new AsyncFromSyncIterator(s); }
12
+ var _parseFrcsSurveyFile2 = _interopRequireDefault(require("../parseFrcsSurveyFile.js"));
13
+ var _parseFrcsPlotFile2 = _interopRequireDefault(require("../parseFrcsPlotFile.js"));
14
+ var _parseFrcsTripSummaryFile2 = _interopRequireDefault(require("../parseFrcsTripSummaryFile.js"));
15
+ function _asyncIterator(r) { var n, t, o, e = 2; for ("undefined" != typeof Symbol && (t = Symbol.asyncIterator, o = Symbol.iterator); e--;) { if (t && null != (n = r[t])) return n.call(r); if (o && null != (n = r[o])) return new AsyncFromSyncIterator(n.call(r)); t = "@@asyncIterator", o = "@@iterator"; } throw new TypeError("Object is not async iterable"); }
16
+ function AsyncFromSyncIterator(r) { function AsyncFromSyncIteratorContinuation(r) { if (Object(r) !== r) return Promise.reject(new TypeError(r + " is not an object.")); var n = r.done; return Promise.resolve(r.value).then(function (r) { return { value: r, done: n }; }); } return AsyncFromSyncIterator = function AsyncFromSyncIterator(r) { this.s = r, this.n = r.next; }, AsyncFromSyncIterator.prototype = { s: null, n: null, next: function next() { return AsyncFromSyncIteratorContinuation(this.n.apply(this.s, arguments)); }, "return": function _return(r) { var n = this.s["return"]; return void 0 === n ? Promise.resolve({ value: r, done: !0 }) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments)); }, "throw": function _throw(r) { var n = this.s["return"]; return void 0 === n ? Promise.reject(r) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments)); } }, new AsyncFromSyncIterator(r); }
17
17
  function linesOf(_x) {
18
18
  return _linesOf.apply(this, arguments);
19
19
  }
@@ -36,9 +36,6 @@ var convert = function convert(fn) {
36
36
  return fn(file, linesOf(str));
37
37
  };
38
38
  };
39
- var parseFrcsSurveyFile = convert(_parseFrcsSurveyFile2["default"]);
40
- exports.parseFrcsSurveyFile = parseFrcsSurveyFile;
41
- var parseFrcsPlotFile = convert(_parseFrcsPlotFile2["default"]);
42
- exports.parseFrcsPlotFile = parseFrcsPlotFile;
43
- var parseFrcsTripSummaryFile = convert(_parseFrcsTripSummaryFile2["default"]);
44
- exports.parseFrcsTripSummaryFile = parseFrcsTripSummaryFile;
39
+ var parseFrcsSurveyFile = exports.parseFrcsSurveyFile = convert(_parseFrcsSurveyFile2["default"]);
40
+ var parseFrcsPlotFile = exports.parseFrcsPlotFile = convert(_parseFrcsPlotFile2["default"]);
41
+ var parseFrcsTripSummaryFile = exports.parseFrcsTripSummaryFile = convert(_parseFrcsTripSummaryFile2["default"]);
package/web/index.d.ts ADDED
@@ -0,0 +1,12 @@
1
+ export declare const parseFrcsSurveyFile: {
2
+ (file: File): Promise<import("..").FrcsSurveyFile>;
3
+ (file: string, input: Blob | ReadableStream<Uint8Array>): Promise<import("..").FrcsSurveyFile>;
4
+ };
5
+ export declare const parseFrcsPlotFile: {
6
+ (file: File): Promise<import("..").FrcsPlotFile>;
7
+ (file: string, input: Blob | ReadableStream<Uint8Array>): Promise<import("..").FrcsPlotFile>;
8
+ };
9
+ export declare const parseFrcsTripSummaryFile: {
10
+ (file: File): Promise<import("..").FrcsTripSummaryFile>;
11
+ (file: string, input: Blob | ReadableStream<Uint8Array>): Promise<import("..").FrcsTripSummaryFile>;
12
+ };