PageSourceSearch

https://reader.exacteditions.com/assets/reader/core/stackers/DecadeStacker-241d0ef5.js

js exacteditions.com collected 2026-10-01 10:19:10 UTC 950 bytes, 32 lines download raw bytes

1import StackConstants from 'reader/core/stackers/StackConstants';
2import YearStacker from 'reader/core/stackers/YearStacker';
3import IssueStackKey from 'reader/core/stackers/IssueStackKey';
4/*
5 * decaffeinate suggestions:
6 * DS102: Remove unnecessary code created because of implicit returns
7 * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
8 */
9
10export default class DecadeStacker {
11  constructor() {
12    this._finerStacker = new YearStacker();
13  }
14
15  finerStacker() {
16    return this._finerStacker;
17  }
18
19  stackKeyForIssue(issue) {
20    const referenceDate = new Date(this.firstYearOfDecade(issue.coverDate), 0);
21
22    return IssueStackKey.keyWithDateAndScale(referenceDate, StackConstants.STACK_SCALE_DECADE);
23  }
24
25  labelForIssueStackKey(isk) {
26    return `${this.firstYearOfDecade(isk.referenceDate)}s`;
27  }
28
29  firstYearOfDecade(coverDate) {
30    return Math.floor(coverDate.getFullYear() / 10) * 10;
31  }
32}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.