@gmod/tabix 1.5.0 → 1.5.1

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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ <a name="1.5.1"></a>
2
+ ## [1.5.1](https://github.com/GMOD/tabix-js/compare/v1.5.0...v1.5.1) (2021-12-15)
3
+
4
+
5
+
6
+ - Add esm module with less babelification for smaller bundle size
7
+
1
8
  <a name="1.5.0"></a>
2
9
  # [1.5.0](https://github.com/GMOD/tabix-js/compare/v1.4.6...v1.5.0) (2020-12-11)
3
10
 
package/README.md CHANGED
@@ -1,8 +1,9 @@
1
1
  # @gmod/tabix
2
2
 
3
3
  [![NPM version](https://img.shields.io/npm/v/@gmod/tabix.svg?style=flat-square)](https://npmjs.org/package/@gmod/tabix)
4
- [![Build Status](https://img.shields.io/travis/GMOD/tabix-js/master.svg?style=flat-square)](https://travis-ci.org/GMOD/tabix-js)
5
- [![codecov](https://codecov.io/gh/GMOD/tabix-js/branch/master/graph/badge.svg)](https://codecov.io/gh/GMOD/tabix-js)
4
+ [![Coverage Status](https://img.shields.io/codecov/c/github/GMOD/tabix-js/master.svg?style=flat-square)](https://codecov.io/gh/GMOD/tabix-js/branch/master)
5
+ [![Build Status](https://img.shields.io/github/workflow/status/GMOD/tabix-js/Push/master?logo=github&style=flat-query)](https://github.com/GMOD/tabix-js/actions?query=branch%3Amaster+workflow%3APush+)
6
+
6
7
 
7
8
 
8
9
  Read Tabix-indexed files using either .tbi or .csi indexes.
package/dist/chunk.js CHANGED
@@ -1,66 +1,37 @@
1
1
  "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
4
-
5
- var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
6
-
7
- _Object$defineProperty(exports, "__esModule", {
8
- value: true
9
- });
10
-
11
- exports.default = void 0;
12
-
13
- var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/classCallCheck"));
14
-
15
- var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/createClass"));
16
-
17
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
18
-
2
+ Object.defineProperty(exports, "__esModule", { value: true });
19
3
  // little class representing a chunk in the index
20
- var Chunk = /*#__PURE__*/function () {
21
- /**
22
- * @param {VirtualOffset} minv
23
- * @param {VirtualOffset} maxv
24
- * @param {number} bin
25
- * @param {number} [fetchedSize]
26
- */
27
- function Chunk(minv, maxv, bin) {
28
- var fetchedSize = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : undefined;
29
- (0, _classCallCheck2.default)(this, Chunk);
30
- (0, _defineProperty2.default)(this, "minv", void 0);
31
- (0, _defineProperty2.default)(this, "maxv", void 0);
32
- (0, _defineProperty2.default)(this, "bin", void 0);
33
- (0, _defineProperty2.default)(this, "_fetchedSize", void 0);
34
- this.minv = minv;
35
- this.maxv = maxv;
36
- this.bin = bin;
37
- this._fetchedSize = fetchedSize;
38
- }
39
-
40
- (0, _createClass2.default)(Chunk, [{
41
- key: "toUniqueString",
42
- value: function toUniqueString() {
43
- return "".concat(this.minv, "..").concat(this.maxv, " (bin ").concat(this.bin, ", fetchedSize ").concat(this.fetchedSize(), ")");
4
+ var Chunk = /** @class */ (function () {
5
+ /**
6
+ * @param {VirtualOffset} minv
7
+ * @param {VirtualOffset} maxv
8
+ * @param {number} bin
9
+ * @param {number} [fetchedSize]
10
+ */
11
+ function Chunk(minv, maxv, bin, fetchedSize) {
12
+ if (fetchedSize === void 0) { fetchedSize = undefined; }
13
+ this.minv = minv;
14
+ this.maxv = maxv;
15
+ this.bin = bin;
16
+ this._fetchedSize = fetchedSize;
44
17
  }
45
- }, {
46
- key: "toString",
47
- value: function toString() {
48
- return this.toUniqueString();
49
- }
50
- }, {
51
- key: "compareTo",
52
- value: function compareTo(b) {
53
- return this.minv.compareTo(b.minv) || this.maxv.compareTo(b.maxv) || this.bin - b.bin;
54
- }
55
- }, {
56
- key: "fetchedSize",
57
- value: function fetchedSize() {
58
- if (this._fetchedSize !== undefined) return this._fetchedSize;
59
- return this.maxv.blockPosition + (1 << 16) - this.minv.blockPosition;
60
- }
61
- }]);
62
- return Chunk;
63
- }();
64
-
18
+ Chunk.prototype.toUniqueString = function () {
19
+ return "".concat(this.minv, "..").concat(this.maxv, " (bin ").concat(this.bin, ", fetchedSize ").concat(this.fetchedSize(), ")");
20
+ };
21
+ Chunk.prototype.toString = function () {
22
+ return this.toUniqueString();
23
+ };
24
+ Chunk.prototype.compareTo = function (b) {
25
+ return (this.minv.compareTo(b.minv) ||
26
+ this.maxv.compareTo(b.maxv) ||
27
+ this.bin - b.bin);
28
+ };
29
+ Chunk.prototype.fetchedSize = function () {
30
+ if (this._fetchedSize !== undefined) {
31
+ return this._fetchedSize;
32
+ }
33
+ return this.maxv.blockPosition + (1 << 16) - this.minv.blockPosition;
34
+ };
35
+ return Chunk;
36
+ }());
65
37
  exports.default = Chunk;
66
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9jaHVuay50cyJdLCJuYW1lcyI6WyJDaHVuayIsIm1pbnYiLCJtYXh2IiwiYmluIiwiZmV0Y2hlZFNpemUiLCJ1bmRlZmluZWQiLCJfZmV0Y2hlZFNpemUiLCJ0b1VuaXF1ZVN0cmluZyIsImIiLCJjb21wYXJlVG8iLCJibG9ja1Bvc2l0aW9uIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFFQTtJQUNxQkEsSztBQU1uQjs7Ozs7O0FBTUEsaUJBQ0VDLElBREYsRUFFRUMsSUFGRixFQUdFQyxHQUhGLEVBS0U7QUFBQSxRQURBQyxXQUNBLHVFQURjQyxTQUNkO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUNBLFNBQUtKLElBQUwsR0FBWUEsSUFBWjtB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ICAgIHJldHVybiB0aGlzLm1heHYuYmxvY2tQb3NpdGlvbiArICgxIDw8IDE2KSAtIHRoaXMubWludi5ibG9ja1Bvc2l0aW9uXG4gIH1cbn1cbiJdfQ==
package/dist/csi.d.ts CHANGED
@@ -66,7 +66,6 @@ export default class CSI extends IndexFile {
66
66
  blocksForRange(refName: string, min: number, max: number, opts?: Options): Promise<Chunk[]>;
67
67
  /**
68
68
  * calculate the list of bins that may overlap with region [beg,end) (zero-based half-open)
69
- * @returns {Array[number]}
70
69
  */
71
70
  reg2bins(beg: number, end: number): number[][];
72
71
  }