@speleotica/frcsdata 4.0.2 → 4.0.4

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 (43) 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 +26 -124
  13. package/parseFrcsPlotFile.js +4 -3
  14. package/parseFrcsSurveyFile.js +126 -107
  15. package/parseFrcsTripSummaryFile.js +5 -4
  16. package/string/index.js +8 -11
  17. package/es/FrcsPlotFile.js +0 -6
  18. package/es/FrcsPlotShot.js +0 -6
  19. package/es/FrcsShot.js +0 -14
  20. package/es/FrcsSurveyFile.js +0 -6
  21. package/es/FrcsTrip.js +0 -6
  22. package/es/FrcsTripSummary.js +0 -6
  23. package/es/FrcsTripSummaryFile.js +0 -6
  24. package/es/formatFrcsShot.js +0 -75
  25. package/es/formatFrcsShot.spec.js +0 -141
  26. package/es/index.js +0 -96
  27. package/es/node/index.js +0 -20
  28. package/es/node/parseFrcsPlotFile.spec.js +0 -167
  29. package/es/node/parseFrcsSurveyFile.spec.js +0 -314
  30. package/es/node/parseFrcsTripSummaryFile.spec.js +0 -78
  31. package/es/parseFrcsPlotFile.js +0 -135
  32. package/es/parseFrcsSurveyFile.js +0 -485
  33. package/es/parseFrcsTripSummaryFile.js +0 -73
  34. package/es/string/index.js +0 -21
  35. package/es/string/parseFrcsPlotFile.spec.js +0 -179
  36. package/es/string/parseFrcsSurveyFile.spec.js +0 -644
  37. package/formatFrcsShot.spec.js +0 -139
  38. package/node/parseFrcsPlotFile.spec.js +0 -181
  39. package/node/parseFrcsSurveyFile.spec.js +0 -328
  40. package/node/parseFrcsTripSummaryFile.spec.js +0 -104
  41. package/string/parseFrcsPlotFile.spec.js +0 -182
  42. package/string/parseFrcsSurveyFile.spec.js +0 -673
  43. package/yarn.lock +0 -9542
@@ -1,104 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
5
- var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
6
- var _mocha = require("mocha");
7
- var _chai = require("chai");
8
- var _index = require("./index");
9
- var _unitized = require("@speleotica/unitized");
10
- (0, _mocha.describe)('parseFrcsTripSummaryFile', function () {
11
- (0, _mocha.it)('basic test', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
12
- var parsed;
13
- return _regenerator["default"].wrap(function _callee$(_context) {
14
- while (1) switch (_context.prev = _context.next) {
15
- case 0:
16
- _context.next = 2;
17
- return (0, _index.parseFrcsTripSummaryFile)(require.resolve('./STAT_sum.txt'));
18
- case 2:
19
- parsed = _context.sent;
20
- (0, _chai.expect)(parsed).to.deep.equal({
21
- errors: [],
22
- tripSummaries: [{
23
- tripNumber: 1,
24
- tripIndex: 0,
25
- date: new Date(81, 1, 15),
26
- totalLength: _unitized.Unitize.feet(258.6),
27
- numShots: 17,
28
- name: 'ENTRANCE DROPS, JOE\'S "I LOVE MY WIFE TRAVERSE", TRICKY TRAVERSE',
29
- excludedLength: _unitized.Unitize.feet(0),
30
- numExcludedShots: 0,
31
- team: ['Peter Quick', 'Keith Ortiz'],
32
- shots: ['A1', 'AD1-AD3', 'AE1', 'AE1 SIDE', 'AE9 SIDE', 'AE10-AE9', 'AE13 SIDE', 'AE15 SIDE', 'AE20-AE11']
33
- }, {
34
- tripNumber: 2,
35
- tripIndex: 1,
36
- date: new Date(81, 1, 14),
37
- totalLength: _unitized.Unitize.feet(1133.75),
38
- numShots: 55,
39
- name: 'TRICKY TRAVERSE AND THEN FIRST SURVEY IN UPPER CROWLWAY',
40
- excludedLength: _unitized.Unitize.feet(0),
41
- numExcludedShots: 0,
42
- team: ['Dan Crowl', 'Keith Ortiz', 'Chip Hopper', 'Peter Quick', 'Larry Bean'],
43
- shots: ['A1-A56']
44
- }, {
45
- tripNumber: 3,
46
- tripIndex: 2,
47
- date: new Date(81, 2, 6),
48
- totalLength: _unitized.Unitize.feet(2371.2),
49
- numShots: 61,
50
- name: "DOUG'S DEMISE (50 FT DROP), CHRIS CROSS, CRAWL ABOVE DROP",
51
- excludedLength: _unitized.Unitize.feet(0),
52
- numExcludedShots: 0,
53
- team: ['Peter Quick', 'Chris Gerace', 'Phil Oden', 'Chip Hopper'],
54
- shots: ['A13 SIDE', 'B1-B5', 'B2 SIDE', 'B3 SIDE', 'B6-B18', 'B17 SIDE', 'B19-B38', 'B32 SIDE', 'BS1-BS5', 'C1-C18']
55
- }]
56
- });
57
- case 4:
58
- case "end":
59
- return _context.stop();
60
- }
61
- }, _callee);
62
- })));
63
- (0, _mocha.it)('old format', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
64
- var parsed;
65
- return _regenerator["default"].wrap(function _callee2$(_context2) {
66
- while (1) switch (_context2.prev = _context2.next) {
67
- case 0:
68
- _context2.next = 2;
69
- return (0, _index.parseFrcsTripSummaryFile)(require.resolve('./STAT_sum_old.txt'));
70
- case 2:
71
- parsed = _context2.sent;
72
- (0, _chai.expect)(parsed).to.deep.equal({
73
- errors: [],
74
- tripSummaries: [{
75
- tripNumber: 1,
76
- tripIndex: 0,
77
- date: new Date(81, 1, 15),
78
- totalLength: _unitized.Unitize.feet(258.6),
79
- numShots: 17,
80
- name: 'ENTRANCE DROPS, JOE\'S "I LOVE MY WIFE TRAVERSE", TRICKY TRAVERSE',
81
- excludedLength: _unitized.Unitize.feet(0),
82
- numExcludedShots: 0,
83
- team: ['Peter Quick', 'Keith Ortiz'],
84
- shots: ['A1', 'AD1-AD3', 'AE1', 'AE1 SIDE', 'AE9 SIDE', 'AE10-AE9', 'AE13 SIDE', 'AE15 SIDE', 'AE20-AE11']
85
- }, undefined, {
86
- tripNumber: 3,
87
- tripIndex: 2,
88
- date: new Date(81, 2, 6),
89
- totalLength: _unitized.Unitize.feet(2371.2),
90
- numShots: 61,
91
- name: "DOUG'S DEMISE (50 FT DROP), CHRIS CROSS, CRAWL ABOVE DROP",
92
- excludedLength: _unitized.Unitize.feet(0),
93
- numExcludedShots: 0,
94
- team: ['Peter Quick', 'Chris Gerace', 'Phil Oden', 'Chip Hopper'],
95
- shots: ['A13 SIDE', 'B1-B5', 'B2 SIDE', 'B3 SIDE', 'B6-B18', 'B17 SIDE', 'B19-B38', 'B32 SIDE', 'BS1-BS5', 'C1-C18']
96
- }]
97
- });
98
- case 4:
99
- case "end":
100
- return _context2.stop();
101
- }
102
- }, _callee2);
103
- })));
104
- });
@@ -1,182 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
5
- var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
6
- var _mocha = require("mocha");
7
- var _index = require("./index");
8
- var _unitized = require("@speleotica/unitized");
9
- var _chai = require("chai");
10
- var data = " 123.182259\n AE20 1 1 0 0 0 153 -257 -51 85 0 20 1\n AE19 1 2 653 402 -548 1046 -587 -174 97 0 200 1\n AE18 2 3 669 449 -3002 995 94 -597 -56 250 0 1\n AE17 3 4 539 1217 -2770 497 47 -298 -28 0 0 1\n AE16 4 5 544 1230 -3441 411 -284 -246 170 60 10 1\n AE15 5 6 1679 1663 -3833 0 0 -282 283 20 10 1\n AE14 6 7 2026 2617 -3730 446 225 -446 -225 0 30 \n AE13 7 8 391 3152 -5788 -111 691 0 0 200 50 1\n AE12 8 9 -1019 2175 -4630 -369 336 221 -201 40 40 1\n AE11 9 10 -1516 1289 -3919 -348 195 610 -342 50 10 1\n";
11
- (0, _mocha.describe)('parseFrcsPlotFile', function () {
12
- (0, _mocha.it)('basic test', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
13
- var parsed;
14
- return _regenerator["default"].wrap(function _callee$(_context) {
15
- while (1) switch (_context.prev = _context.next) {
16
- case 0:
17
- _context.next = 2;
18
- return (0, _index.parseFrcsPlotFile)('cdata.fr', data);
19
- case 2:
20
- parsed = _context.sent;
21
- (0, _chai.expect)(parsed).to.deep.equal({
22
- totalLength: _unitized.Unitize.feet(123.182259),
23
- errors: [],
24
- shots: [{
25
- toName: 'AE20',
26
- isSurface: false,
27
- fromNumber: 1,
28
- toNumber: 1,
29
- easting: _unitized.Unitize.feet(0),
30
- northing: _unitized.Unitize.feet(0),
31
- elevation: _unitized.Unitize.feet(0),
32
- leftEasting: _unitized.Unitize.feet(1.53),
33
- leftNorthing: _unitized.Unitize.feet(-2.57),
34
- rightEasting: _unitized.Unitize.feet(-0.51),
35
- rightNorthing: _unitized.Unitize.feet(0.85),
36
- up: _unitized.Unitize.feet(0),
37
- down: _unitized.Unitize.feet(2),
38
- tripNumber: 1
39
- }, {
40
- toName: 'AE19',
41
- isSurface: false,
42
- fromNumber: 1,
43
- toNumber: 2,
44
- easting: _unitized.Unitize.feet(6.53),
45
- northing: _unitized.Unitize.feet(4.02),
46
- elevation: _unitized.Unitize.feet(-5.48),
47
- leftEasting: _unitized.Unitize.feet(10.46),
48
- leftNorthing: _unitized.Unitize.feet(-5.87),
49
- rightEasting: _unitized.Unitize.feet(-1.74),
50
- rightNorthing: _unitized.Unitize.feet(0.97),
51
- up: _unitized.Unitize.feet(0),
52
- down: _unitized.Unitize.feet(20),
53
- tripNumber: 1
54
- }, {
55
- toName: 'AE18',
56
- isSurface: false,
57
- fromNumber: 2,
58
- toNumber: 3,
59
- easting: _unitized.Unitize.feet(6.69),
60
- northing: _unitized.Unitize.feet(4.49),
61
- elevation: _unitized.Unitize.feet(-30.02),
62
- leftEasting: _unitized.Unitize.feet(9.95),
63
- leftNorthing: _unitized.Unitize.feet(0.94),
64
- rightEasting: _unitized.Unitize.feet(-5.97),
65
- rightNorthing: _unitized.Unitize.feet(-0.56),
66
- up: _unitized.Unitize.feet(25),
67
- down: _unitized.Unitize.feet(0),
68
- tripNumber: 1
69
- }, {
70
- toName: 'AE17',
71
- isSurface: false,
72
- fromNumber: 3,
73
- toNumber: 4,
74
- easting: _unitized.Unitize.feet(5.39),
75
- northing: _unitized.Unitize.feet(12.17),
76
- elevation: _unitized.Unitize.feet(-27.7),
77
- leftEasting: _unitized.Unitize.feet(4.97),
78
- leftNorthing: _unitized.Unitize.feet(0.47),
79
- rightEasting: _unitized.Unitize.feet(-2.98),
80
- rightNorthing: _unitized.Unitize.feet(-0.28),
81
- up: _unitized.Unitize.feet(0),
82
- down: _unitized.Unitize.feet(0),
83
- tripNumber: 1
84
- }, {
85
- toName: 'AE16',
86
- isSurface: false,
87
- fromNumber: 4,
88
- toNumber: 5,
89
- easting: _unitized.Unitize.feet(5.44),
90
- northing: _unitized.Unitize.feet(12.3),
91
- elevation: _unitized.Unitize.feet(-34.41),
92
- leftEasting: _unitized.Unitize.feet(4.11),
93
- leftNorthing: _unitized.Unitize.feet(-2.84),
94
- rightEasting: _unitized.Unitize.feet(-2.46),
95
- rightNorthing: _unitized.Unitize.feet(1.7),
96
- up: _unitized.Unitize.feet(6),
97
- down: _unitized.Unitize.feet(1),
98
- tripNumber: 1
99
- }, {
100
- toName: 'AE15',
101
- isSurface: false,
102
- fromNumber: 5,
103
- toNumber: 6,
104
- easting: _unitized.Unitize.feet(16.79),
105
- northing: _unitized.Unitize.feet(16.63),
106
- elevation: _unitized.Unitize.feet(-38.33),
107
- leftEasting: _unitized.Unitize.feet(0),
108
- leftNorthing: _unitized.Unitize.feet(0),
109
- rightEasting: _unitized.Unitize.feet(-2.82),
110
- rightNorthing: _unitized.Unitize.feet(2.83),
111
- up: _unitized.Unitize.feet(2),
112
- down: _unitized.Unitize.feet(1),
113
- tripNumber: 1
114
- }, {
115
- toName: 'AE14',
116
- isSurface: false,
117
- fromNumber: 6,
118
- toNumber: 7,
119
- easting: _unitized.Unitize.feet(20.26),
120
- northing: _unitized.Unitize.feet(26.17),
121
- elevation: _unitized.Unitize.feet(-37.3),
122
- leftEasting: _unitized.Unitize.feet(4.46),
123
- leftNorthing: _unitized.Unitize.feet(2.25),
124
- rightEasting: _unitized.Unitize.feet(-4.46),
125
- rightNorthing: _unitized.Unitize.feet(-2.25),
126
- up: _unitized.Unitize.feet(0),
127
- down: _unitized.Unitize.feet(3),
128
- tripNumber: null
129
- }, {
130
- toName: 'AE13',
131
- isSurface: false,
132
- fromNumber: 7,
133
- toNumber: 8,
134
- easting: _unitized.Unitize.feet(3.91),
135
- northing: _unitized.Unitize.feet(31.52),
136
- elevation: _unitized.Unitize.feet(-57.88),
137
- leftEasting: _unitized.Unitize.feet(-1.11),
138
- leftNorthing: _unitized.Unitize.feet(6.91),
139
- rightEasting: _unitized.Unitize.feet(0),
140
- rightNorthing: _unitized.Unitize.feet(0),
141
- up: _unitized.Unitize.feet(20),
142
- down: _unitized.Unitize.feet(5),
143
- tripNumber: 1
144
- }, {
145
- toName: 'AE12',
146
- isSurface: false,
147
- fromNumber: 8,
148
- toNumber: 9,
149
- easting: _unitized.Unitize.feet(-10.19),
150
- northing: _unitized.Unitize.feet(21.75),
151
- elevation: _unitized.Unitize.feet(-46.3),
152
- leftEasting: _unitized.Unitize.feet(-3.69),
153
- leftNorthing: _unitized.Unitize.feet(3.36),
154
- rightEasting: _unitized.Unitize.feet(2.21),
155
- rightNorthing: _unitized.Unitize.feet(-2.01),
156
- up: _unitized.Unitize.feet(4),
157
- down: _unitized.Unitize.feet(4),
158
- tripNumber: 1
159
- }, {
160
- toName: 'AE11',
161
- isSurface: false,
162
- fromNumber: 9,
163
- toNumber: 10,
164
- easting: _unitized.Unitize.feet(-15.16),
165
- northing: _unitized.Unitize.feet(12.89),
166
- elevation: _unitized.Unitize.feet(-39.19),
167
- leftEasting: _unitized.Unitize.feet(-3.48),
168
- leftNorthing: _unitized.Unitize.feet(1.95),
169
- rightEasting: _unitized.Unitize.feet(6.1),
170
- rightNorthing: _unitized.Unitize.feet(-3.42),
171
- up: _unitized.Unitize.feet(5),
172
- down: _unitized.Unitize.feet(1),
173
- tripNumber: 1
174
- }]
175
- });
176
- case 4:
177
- case "end":
178
- return _context.stop();
179
- }
180
- }, _callee);
181
- })));
182
- });