![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
usps-webtools-promise
Advanced tools
This package was forked from MadisonReed/usps-webtools, but it has been modernized with Typescript and Promises (async/await). Note: Version 2 is a drop-in replacement for MadisonReed/usps-webtools, it produces the same output. Version 3 uses the same output from USPS, with the exception of Address1 and Address2 being switched, per social norms.
npm install usps-webtools-promise
Initializing the usps model with a user id.
Example:
const USPS = require('usps-webtools-promise').default;
// or
import USPS from "usps-webtools-promise";
const usps = new USPS({
// USPS returns ALL CAPS, this boolean turns on Proper Caps for both Street lines and City. This is an optional item. Defaults to true.
properCase: boolean,
// Staging will run all functions on the USPS Staging servers instead of Production. Defaults to false.
staging: boolean,
// This can be created by going to https://www.usps.com/business/web-tools-apis/ and registering for an id
userId: 'USPS User id',
});
Verify takes one parameter: object
object: Address1, Address2, City, State, Zip
Example
usps.verify({
Address1: '322 3rd st.',
Address2: 'Apt 2',
City: 'San Francisco',
State: 'CA',
Zip: '94103'
}).then(address => {
console.log(address);
});
zipCodeLookup takes one parameter: object.
object: Address1, Address2, City, State
Example
const address = await usps.zipCodeLookup({
Address1: '322 3rd st.',
Address2: 'Apt 2',
City: 'San Francisco',
State: 'CA'
});
console.log(address);
cityStateLookup takes one parameter: zipcode.
zipcode: 5 digit Zip Code as a string
Example
const result = await usps.cityStateLookup('94107');
console.log(result);
FAQs
API wrapper for the USPS Web-Tools, with Promises!
The npm package usps-webtools-promise receives a total of 445 weekly downloads. As such, usps-webtools-promise popularity was classified as not popular.
We found that usps-webtools-promise demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.