New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

usps-webtools-promise

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

usps-webtools-promise - npm Package Compare versions

Comparing version 6.0.1 to 6.1.0

dist/multiple-address-validate.d.ts

6

dist/usps.d.ts
import verify from "./address-validate.js";
import verifyMultiple from "./multiple-address-validate.js";
import cityStateLookup from "./lookups/city-state-lookup.js";

@@ -27,2 +28,6 @@ import pricingRateLookup from "./lookups/pricing-rate-lookup.js";

}
export interface MultipleAddress extends Address {
"@ID": string;
Error?: ErrorResponse;
}
export default class {

@@ -34,3 +39,4 @@ cityStateLookup: typeof cityStateLookup;

verify: typeof verify;
verifyMultiple: typeof verifyMultiple;
zipCodeLookup: typeof zipCodeLookup;
}

2

dist/usps.js
import verify from "./address-validate.js";
import verifyMultiple from "./multiple-address-validate.js";
import cityStateLookup from "./lookups/city-state-lookup.js";

@@ -18,3 +19,4 @@ import pricingRateLookup from "./lookups/pricing-rate-lookup.js";

verify = verify;
verifyMultiple = verifyMultiple;
zipCodeLookup = zipCodeLookup;
}

3

dist/utils/request.d.ts
import type { AddressValidateRequest, AddressValidateResponse } from "../address-validate.js";
import type { MultipleAddressValidateRequest } from "../multiple-address-validate.js";
import type { CityStateLookupRequest, CityStateLookupResponse } from "../lookups/city-state-lookup.js";

@@ -13,3 +14,3 @@ import type { RateV4Request, RateV4Response } from "../lookups/pricing-rate-lookup.js";

}
declare const _default: (api: string, method: string, property: string, config: Config, parameters: AddressValidateRequest | ZipCodeLookupRequest | CityStateLookupRequest | RateV4Request) => Promise<AddressValidateResponse | ZipCodeLookupResponse | CityStateLookupResponse | RateV4Response | ErrorResponse>;
declare const _default: (api: string, method: string, property: string, config: Config, parameters: AddressValidateRequest | MultipleAddressValidateRequest | ZipCodeLookupRequest | CityStateLookupRequest | RateV4Request) => Promise<AddressValidateResponse | ZipCodeLookupResponse | CityStateLookupResponse | RateV4Response | ErrorResponse>;
export default _default;
{
"name": "usps-webtools-promise",
"version": "6.0.1",
"version": "6.1.0",
"description": "API wrapper for the USPS Web-Tools, with Promises!",

@@ -54,13 +54,13 @@ "keywords": [

"@ianvs/prettier-plugin-sort-imports": "^4.1.1",
"@rushstack/eslint-patch": "^1.5.1",
"@sparticuz/eslint-config": "^7.4.8",
"@rushstack/eslint-patch": "^1.6.0",
"@sparticuz/eslint-config": "^7.5.0",
"@tsconfig/node18": "^18.2.2",
"@tsconfig/strictest": "^2.0.2",
"@types/node": "^16.18.59",
"ava": "^5.3.1",
"@types/node": "^16.18.68",
"ava": "^6.0.1",
"c8": "^8.0.1",
"eslint": "^8.52.0",
"prettier": "^3.0.3",
"tsx": "^3.14.0",
"typescript": "^5.2.2"
"eslint": "^8.55.0",
"prettier": "^3.1.0",
"tsx": "^4.6.2",
"typescript": "^5.3.3"
},

@@ -67,0 +67,0 @@ "engines": {

@@ -34,2 +34,31 @@ ![Node.js CI](https://github.com/Sparticuz/usps-webtools-promise/workflows/Node.js%20CI/badge.svg) ![CodeQL](https://github.com/Sparticuz/usps-webtools-promise/workflows/CodeQL/badge.svg)

### verifyMultiple(object[])
Verify takes one parameter: object[]
object[]: [{Address1, Address2, City, State, Zip}]
**Example**
```js
usps
.verifyMultiple([{
Address1: "322 3rd st.",
Address2: "Apt 2",
City: "San Francisco",
State: "CA",
Zip5: "94103",
}, {
Address1: "322 3rd st.",
Address2: "Apt 2",
City: "San Francisco",
State: "CA",
Zip5: "94103",
}
])
.then((address) => {
console.log(address);
});
```
### verify(object)

@@ -92,17 +121,18 @@

```
-------------------------|---------|----------|---------|---------|----------------------------------
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
-------------------------|---------|----------|---------|---------|----------------------------------
All files | 91.78 | 59.61 | 87.5 | 91.78 |
src | 99.32 | 47.36 | 100 | 99.32 |
address-validate.ts | 98.97 | 33.33 | 100 | 98.97 | 94
usps.ts | 100 | 100 | 100 | 100 |
src/lookups | 85.55 | 60 | 66.66 | 85.55 |
city-state-lookup.ts | 97.95 | 80 | 100 | 97.95 | 45
pricing-rate-lookup.ts | 75.16 | 100 | 0 | 75.16 | 113-149
zip-code-lookup.ts | 98.61 | 50 | 100 | 98.61 | 68
src/utils | 94.58 | 72.22 | 100 | 94.58 |
proper-case.ts | 97.95 | 100 | 100 | 97.95 | 36
request.ts | 93.5 | 61.53 | 100 | 93.5 | 48-49,55,115-116,120-122,153-154
-------------------------|---------|----------|---------|---------|----------------------------------
-------------------------------|---------|----------|---------|---------|------------------------------
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
-------------------------------|---------|----------|---------|---------|------------------------------
All files | 91.64 | 62.65 | 93.75 | 91.64 |
src | 95.85 | 55.55 | 100 | 95.85 |
address-validate.ts | 96 | 37.5 | 100 | 96 | 81,84,87,93
multiple-address-validate.ts | 92.77 | 54.54 | 100 | 92.77 | 62,65,68,80-82
usps.ts | 100 | 100 | 100 | 100 |
src/lookups | 84.81 | 66.66 | 83.33 | 84.81 |
city-state-lookup.ts | 100 | 83.33 | 100 | 100 | 45
pricing-rate-lookup.ts | 74.49 | 100 | 50 | 74.49 | 112-149
zip-code-lookup.ts | 95.83 | 54.54 | 100 | 95.83 | 57,60,63
src/utils | 95.65 | 75 | 100 | 95.65 |
proper-case.ts | 100 | 100 | 100 | 100 |
request.ts | 94.23 | 64.28 | 100 | 94.23 | 54-55,61,112,122-123,127-129
-------------------------------|---------|----------|---------|---------|------------------------------
```
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