
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
firststreet-js
Advanced tools
This is the official implementation of the First Street Foundation API in JavaScript.
For more in-depth guides, usage and API access, please see the documentation at docs.firststreet.dev.
First install firststreet-js:
npm install firststreet-js
Next, import it into your project
import FirstStreet from 'firststreet-js';
// Or commonjs
const FirstStreet = require('firststreet-js');
In order to use the First Street Foundation API, you must register for an API key at https://firststreet.dev.
// Create a new First Street Foundation API Client
const fs = new FirstStreet("api-key");
The client supports querying Firststreet API endpoints corresponding to documentation, extensive examples can be found in ./tests
directory.
Generally, for endpoints that require location and fsid, first need to initialize lookup object as in below example, and then use it for querying the data:
const fs = new FirstStreet(apiKey);
const lookup = fs.lookup('city', { fsid: 4808860 });
const probability = await lookup.probability('count');
For endpoints that do not use fsid, please pass the parameter(s) directly to the endpoint call, as in this example:
const fs = new FirstStreet(apiKey);
const historic = await fs.historic('event', { id: 12 });
Similarly, if endpoint accepts other parameters in addition to location lookup, then these can be passed to the endpoint call directly:
const fs = new FirstStreet(apiKey);
const lookup = fs.lookup('property', { fsid: 4801470191 });
const aal = await lookup.economic('aal', { basement: true, floorElevation: 122, depth: 100 });
Errors from the API and network errors are propagated to caller.
FAQs
"A Javascript API Client for the First Street Foundation API"
The npm package firststreet-js receives a total of 1 weekly downloads. As such, firststreet-js popularity was classified as not popular.
We found that firststreet-js 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.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.