Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@mangosteen/edgar-url

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mangosteen/edgar-url - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

4

dist/index.d.ts

@@ -48,3 +48,3 @@ /**

*
* This file also seems to be updated whenever there are corrections submitted.
* This file seems to be updated when corrections are submitted.
*

@@ -59,3 +59,3 @@ * @example `https://www.sec.gov/Archives/edgar/data/0000320193/0000320193-20-000096.txt`

* Gets URL of a filing header in SGML format. The header is in machine-readable format.
* The header file does not seem to be updated whenever corrections are submitted.
* The header file does not seem to be updated when corrections are submitted.
*

@@ -62,0 +62,0 @@ * @example `https://www.sec.gov/Archives/edgar/data/320193/000032019320000096/0000320193-20-000096.hdr.sgml`

@@ -15,3 +15,3 @@ "use strict";

const url = new url_1.URL('https://www.sec.gov/edgar/browse/');
url.searchParams.append("CIK", utils_1.formatCik(cik));
url.searchParams.append("CIK", (0, utils_1.formatCik)(cik));
return url.toString();

@@ -29,3 +29,3 @@ }

const url = new url_1.URL('https://www.edgarcompany.sec.gov/servlet/CompanyDBSearch?page=detailed&main_back=1');
url.searchParams.append("cik", utils_1.formatCik(cik));
url.searchParams.append("cik", (0, utils_1.formatCik)(cik));
return url.toString();

@@ -43,3 +43,3 @@ }

const url = new url_1.URL('https://www.sec.gov/cgi-bin/own-disp?action=getissuer');
url.searchParams.append("CIK", utils_1.formatCik(cik));
url.searchParams.append("CIK", (0, utils_1.formatCik)(cik));
return url.toString();

@@ -57,3 +57,3 @@ }

const url = new url_1.URL('https://www.sec.gov/cgi-bin/own-disp?action=getowner');
url.searchParams.append("CIK", utils_1.formatCik(cik));
url.searchParams.append("CIK", (0, utils_1.formatCik)(cik));
return url.toString();

@@ -70,3 +70,3 @@ }

function geEntityJsonUrl(cik) {
return new url_1.URL(`https://data.sec.gov/submissions/CIK${utils_1.formatCik(cik)}.json`).toString();
return new url_1.URL(`https://data.sec.gov/submissions/CIK${(0, utils_1.formatCik)(cik)}.json`).toString();
}

@@ -81,3 +81,3 @@ exports.geEntityJsonUrl = geEntityJsonUrl;

*
* This file also seems to be updated whenever there are corrections submitted.
* This file seems to be updated when corrections are submitted.
*

@@ -90,5 +90,5 @@ * @example `https://www.sec.gov/Archives/edgar/data/0000320193/0000320193-20-000096.txt`

function getFilingUrl(cik, accessionNumber) {
utils_1.validateAccessionNumber(accessionNumber);
cik = utils_1.repairCik(cik, accessionNumber);
return new url_1.URL(`https://www.sec.gov/Archives/edgar/data/${utils_1.formatCik(cik)}/${accessionNumber}.txt`).toString();
(0, utils_1.validateAccessionNumber)(accessionNumber);
cik = (0, utils_1.repairCik)(cik, accessionNumber);
return new url_1.URL(`https://www.sec.gov/Archives/edgar/data/${(0, utils_1.formatCik)(cik)}/${accessionNumber}.txt`).toString();
}

@@ -98,3 +98,3 @@ exports.getFilingUrl = getFilingUrl;

* Gets URL of a filing header in SGML format. The header is in machine-readable format.
* The header file does not seem to be updated whenever corrections are submitted.
* The header file does not seem to be updated when corrections are submitted.
*

@@ -107,10 +107,5 @@ * @example `https://www.sec.gov/Archives/edgar/data/320193/000032019320000096/0000320193-20-000096.hdr.sgml`

function getFilingHeaderUrl(cik, accessionNumber) {
utils_1.validateAccessionNumber(accessionNumber);
cik = utils_1.repairCik(cik, accessionNumber);
if (cik === 880026 && accessionNumber === '0001193125-08-024463') {
// Doesn't exist: https://www.sec.gov/Archives/edgar/data/0000880026/000119312508024463/0001193125-08-024463.hdr.sgml
// Exists: https://www.sec.gov/Archives/edgar/data/0001319519/000119312508024463/0001193125-08-024463.hdr.sgml
cik = 1319519;
}
const f_cik = utils_1.formatCik(cik), f_accessionNumber = accessionNumber.replace(/\-+/g, '');
(0, utils_1.validateAccessionNumber)(accessionNumber);
cik = (0, utils_1.repairCik)(cik, accessionNumber);
const f_cik = (0, utils_1.formatCik)(cik), f_accessionNumber = accessionNumber.replace(/\-+/g, '');
return new url_1.URL(`https://www.sec.gov/Archives/edgar/data/${f_cik}/${f_accessionNumber}/${accessionNumber}.hdr.sgml`).toString();

@@ -128,5 +123,5 @@ }

function getFilingPageUrl(cik, accessionNumber) {
utils_1.validateAccessionNumber(accessionNumber);
cik = utils_1.repairCik(cik, accessionNumber);
const fCik = utils_1.formatCik(cik);
(0, utils_1.validateAccessionNumber)(accessionNumber);
cik = (0, utils_1.repairCik)(cik, accessionNumber);
const fCik = (0, utils_1.formatCik)(cik);
return new url_1.URL(`https://www.sec.gov/Archives/edgar/data/${fCik}/${accessionNumber}-index.htm`).toString();

@@ -133,0 +128,0 @@ }

@@ -19,2 +19,9 @@ "use strict";

}
if (cik === 880026 && accessionNumber === '0001193125-08-024463') {
// Broken: https://www.sec.gov/Archives/edgar/data/880026/000119312508024463/0001193125-08-024463.txt
// Doesn't exist: https://www.sec.gov/Archives/edgar/data/880026/000119312508024463/0001193125-08-024463.hdr.sgml
// Fixed: https://www.sec.gov/Archives/edgar/data/1319519/000119312508024463/0001193125-08-024463.txt
// Exists: https://www.sec.gov/Archives/edgar/data/1319519/000119312508024463/0001193125-08-024463.hdr.sgml
return 1319519;
}
return cik;

@@ -21,0 +28,0 @@ }

{
"name": "@mangosteen/edgar-url",
"version": "1.0.1",
"version": "1.0.2",
"description": "Get SEC EDGAR URLs for filings and entities.",

@@ -11,6 +11,7 @@ "main": "dist/index.js",

"scripts": {
"prebuild": "rimraf dist",
"build": "tsc",
"test-publish-npm": "npm pack",
"publish-npm": "npm publish --access public",
"prepare": "tsc"
"prepublish": "npm run build"
},

@@ -40,4 +41,5 @@ "repository": {

"@types/node": "^10.17.60",
"typescript": "^4.3.5"
"rimraf": "^3.0.2",
"typescript": "^4.4.3"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc