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

@aceandtate/clicktoaddress

Package Overview
Dependencies
Maintainers
4
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aceandtate/clicktoaddress - npm Package Compare versions

Comparing version 0.1.12 to 0.1.13

3

dist/mapRetrievedResult.js

@@ -23,2 +23,5 @@ "use strict";

US: function (result) {
if (isNumeric(result.building_name) && !result.building_number) {
return __assign(__assign({}, result), { building_name: "", building_number: result.building_name, postal_code: result.postal_code.split("-")[0] });
}
return __assign(__assign({}, result), { postal_code: result.postal_code.split("-")[0] });

@@ -25,0 +28,0 @@ }

2

package.json
{
"name": "@aceandtate/clicktoaddress",
"version": "0.1.12",
"version": "0.1.13",
"description": "A clicktoaddress client",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -47,3 +47,3 @@ import { RetrieveArgs, RetrieveResponseResult } from "./types";

it("should not format the post code in another coutry", () => {
it("should not format the post code in another country", () => {
const result = mapRetrievedResult(

@@ -56,2 +56,26 @@ { country: "NL" } as RetrieveArgs,

});
it("should map US address' building number and name", () => {
const result = mapRetrievedResult(
{ country: "US" } as RetrieveArgs,
{ building_name: "1", building_number: "", postal_code: "30328-6228" } as RetrieveResponseResult
);
expect(result).toEqual({
building_number: "1",
building_name: "",
postal_code: "30328"
});
});
it("should skip mapping US address' when data seems valid", () => {
const result = mapRetrievedResult(
{ country: "US" } as RetrieveArgs,
{ building_name: "x", building_number: "1", postal_code: "30328-6228" } as RetrieveResponseResult
);
expect(result).toEqual({
building_number: "1",
building_name: "x",
postal_code: "30328"
});
});
});

@@ -23,2 +23,10 @@ import { RetrieveResponseResult, RetrieveArgs } from "./types";

US(result: RetrieveResponseResult) {
if (isNumeric(result.building_name) && !result.building_number) {
return {
...result,
building_name: "",
building_number: result.building_name,
postal_code: result.postal_code.split("-")[0]
};
}
return {

@@ -25,0 +33,0 @@ ...result,

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