sec-edgar-api 0.4.1 → 0.4.2

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.
@@ -301,7 +301,7 @@ export default class SecEdgarApi {
301
301
  /**
302
302
  * @see https://www.sec.gov/structureddata/rss-feeds-submitted-filings
303
303
  */
304
- getCurrentFilingsXBRL(params?: {
304
+ getCurrentFilingsXbrl(params?: {
305
305
  taxonomy?: 'usGaap' | 'mutualFund' | 'inlineXbrl' | 'allXbrl';
306
306
  }): Promise<import("../../types").CurrentFilingsXBRL>;
307
307
  /**
@@ -403,7 +403,7 @@ var SecEdgarApi = /** @class */ (function () {
403
403
  */
404
404
  SecEdgarApi.prototype.buildDocumentUrl = function (params) {
405
405
  var symbol = params.symbol, accessionNumber = params.accessionNumber, fileNameProp = params.fileName;
406
- var cik = this.getCikString(symbol);
406
+ var cik = Number(this.getCikString(symbol));
407
407
  var fileName = fileNameProp !== null && fileNameProp !== void 0 ? fileNameProp : "".concat(accessionNumber, ".txt");
408
408
  return "".concat(this.baseUrlSec, "/Archives/edgar/data/").concat(cik, "/").concat(accessionNumber.replace(/-/g, ''), "/").concat(fileName);
409
409
  };
@@ -598,7 +598,7 @@ var SecEdgarApi = /** @class */ (function () {
598
598
  switch (_e.label) {
599
599
  case 0:
600
600
  _b = params !== null && params !== void 0 ? params : {}, _c = _b.page, page = _c === void 0 ? 1 : _c, _d = _b.itemsPerPage, itemsPerPage = _d === void 0 ? 100 : _d, formType = _b.formType, searchType = _b.searchType, symbol = _b.symbol;
601
- type = (_a = formType === null || formType === void 0 ? void 0 : formType.replace(/\s/, '+')) !== null && _a !== void 0 ? _a : null;
601
+ type = (_a = formType === null || formType === void 0 ? void 0 : formType.trim().replace(/\s/g, '+')) !== null && _a !== void 0 ? _a : null;
602
602
  owner = searchType !== null && searchType !== void 0 ? searchType : ((formType === null || formType === void 0 ? void 0 : formType.includes(' ')) ? 'include' : 'only');
603
603
  offset = (page - 1) * Math.max(1, itemsPerPage || 100);
604
604
  cik = symbol ? Number(this.getCikString(symbol)) : null;
@@ -620,7 +620,7 @@ var SecEdgarApi = /** @class */ (function () {
620
620
  /**
621
621
  * @see https://www.sec.gov/structureddata/rss-feeds-submitted-filings
622
622
  */
623
- SecEdgarApi.prototype.getCurrentFilingsXBRL = function (params) {
623
+ SecEdgarApi.prototype.getCurrentFilingsXbrl = function (params) {
624
624
  return __awaiter(this, void 0, void 0, function () {
625
625
  var _a, taxonomy, urlByTaxonomy, url, xml;
626
626
  return __generator(this, function (_b) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sec-edgar-api",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "Fetch and parse SEC earnings reports and other filings. Useful for financial analysis.",
5
5
  "main": "build/index.js",
6
6
  "author": "Andrew Evers (https://github.com/andyevers)",