
Product
Socket Firewall Now Blocks Malicious VS Code and Open VSX Extensions
Socket Firewall blocks malicious VS Code and Open VSX extensions before install, protecting developers from compromised editor marketplaces.
@4lch4/lib-congress
Advanced tools
This package is a wrapper library, written in TypeScript, that enables users to interact with the US Congress API and retrieve the data it makes available.
For notes on the architecture/structure of this package/library, please refer to the Architecture.md file.
In order to verify functionality of the library I built a suite of tests that verify each possible endpoint meets the following requirements:
{ congress: 117 } to the getAmendments method should result in hitting the /amendment/117 endpoint.For further details, refer to the Testing file.
To use the library you only need to import the CongressAPI class and call whichever function you wish. For example, to retrieve amendments you can do the following:
import { CongressAPI } from '@4lch4/lib-congress'
const congress = new CongressAPI({
apiKey: 'pxPXweYA8wObIqUERnVRf2v6d84uOxjJ5MpJ8kgO',
responseFormat: 'json' as ResponseFormat,
baseUrl: 'https://api.congress.gov/v3',
trimmedResponses: true,
dataDir: 'data',
debug: false
})
congress
.getAmendments()
.then(amendments => {
console.log(`${amendments.data.length} amendments retrieved...`)
console.log('Execution completed successfully!')
})
.catch(err => {
console.error('Error received from CongressAPI#getAmendments...')
console.error(err)
})
The following is a list of all the functions/methods that are exported by the CongressAPI class:
getAmendmentsgetBillsgetSummariesgetCongressgetMembersgetCommitteesgetCommitteeReportsgetCongressionalRecordgetHouseCommunicationsgetNominationsgetTreatiesFAQs
A library for interacting with the api.congress.gov API.
We found that @4lch4/lib-congress demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket Firewall blocks malicious VS Code and Open VSX extensions before install, protecting developers from compromised editor marketplaces.

Research
More than 140 Mastra npm packages were compromised in a supply chain attack that used a typosquatted dependency to deliver a cross-platform infostealer during installation.

Research
/Security News
A new npm package tests AI malware scanners with prompt injection, safety-triggering comments, context flooding, and obfuscated JavaScript.