npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

address-service-js

v0.1.2

Published

Core JS package to get addresses of USA

Downloads

6

Readme

Address Service

hoppysearch - JavaScript/Node.js client for AddressService

Package Name: address-service-js

What You Get:

  1. A feature offering a selection of addresses with diverse fields through autocomplete functionality.
  2. Fields include coordinates, street number, city, street, district, postcode, region, and a unique identifier (hs_guid).
  3. Customize your own user form with the retrieved address data.ith a seamless experience to obtain addresses.

Installation

Proceed with the installation by following these steps:

Getting Started

  1. Install the address-service-js package in your JavaScript/Node.js project:

    cmd

    npm i address-service-js
  2. Depending on your project's syntax, import the addressService function accordingly.

    1. For ES syntax:

      Javascript

       import addressService from 'address-service-js';
       // Ensure "type": "module" in package.json
    2. For CommonJS syntax:

      Javascript

       const addressService = require('address-service-js');
       // Ensure "type": "commonjs" or skip "type" in package.json
  3. Use the function to retrieve addresses:

    Javascript

        async function getAddress(address) {
        const result = await addressService(address);
        console.log(result);
       }
  4. Call the function with the desired address:

    Javascript

       getAddress("20 A");
  5. Upon calling the getAddress function with valid parameters, you will receive a JSON response containing a list of addresses. Here's an example output:

        {
                "totalHits": { "value": 27, "relation": "GREATER_THAN_OR_EQUAL_TO" },
                 "processingTime": "462ms",
                 "documents": [
                        {
                            "coordinates_0": -70.5612909,
                            "number": "20",
                            "coordinates_1": 41.9318039,
                            "unit": "",
                            "city": "PLYMOUTH",
                            "street": "AVENUE A",
                            "district": "PLYMOUTH",
                            "postcode": "02360",
                            "region": "MA",
                            "hs_guid": "7e1f48df-b929-4c12-a779-10158bc9370d"
                        },
                        {
                            "coordinates_0": -71.7178363,
                            "number": "20",
                            "coordinates_1": 42.0750203,
                            "unit": "",
                            "city": "DOUGLAS",
                            "street": "A STREET",
                            "district": "WORCESTER",
                            "postcode": "01516",
                            "region": "MA",
                            "hs_guid": "64853dc7-bba1-4cb5-aa88-3311b90e914b"
                        },
                        // ... (Additional address entries)
                    ]
            }

If you need video help to use Address Service Node Js/Javascript package then watch this video:Address Service Node Js/Javascript Demo