zcs

2.8.4 • Public • Published

zcs

A quick and light esm / node module to look up state city or zips to get either. It also has lookahead / autocomplete

Install

npm install zcs

Node Usage

    const {  
    getByStateCity,
    getByCityState,
    getByZip,
    zipLookAhead,
    cityLookAhead,
    stateLookAhead,
    validCity,
    validState,
    validZip,
    getCitiesNameByState,
    getCitiesNameAndPopulationByState 
  } = require('zcs')
     // optional state as second param
    console.log(getByCityState('Orlando'))

     // optional city as second param
    console.log(getByStateCity('FL')) 

    console.log(getByZip('03809'))

    // optional limit as second param
    console.log(zipLookAhead('038'), 10) 
    console.log(cityLookAhead('orlan'), 5)
    console.log(stateLookAhead('N'),10)
    
    console.log(validState("FL"));
    console.log(validState("FLA"));
    console.log(validCity("Orlando"));
    console.log(validCity("OrlandFAS"));

    console.log(getCitiesNameByState("FL"));
    console.log(getCitiesNameAndPopulationByState("FL"));

Web Usage

 import {   
    getByStateCity,
    getByCityState,
    getByZip,
    zipLookAhead,
    cityLookAhead,
    stateLookAhead,
    validCity,
    validState,
    validZip,
    getCitiesNameByState,
    getCitiesNameAndPopulationByState
  } from 'zcs'

     // optional state as second param
    console.log(getByCityState('Orlando'))

     // optional city as second param
    console.log(getByStateCity('FL')) 

    console.log(getByZip('03809'))

    // optional limit as second param
    console.log(zipLookAhead('038'), 10) 
    console.log(cityLookAhead('orlan'), 5)
    console.log(stateLookAhead('N'),10)

        console.log(validState("FL"));
    console.log(validState("FLA"));
    console.log(validCity("Orlando"));
    console.log(validCity("OrlandFAS"));

    console.log(getCitiesNameByState("FL"));
    console.log(getCitiesNameAndPopulationByState("FL"));

Package Sidebar

Install

npm i zcs

Weekly Downloads

1,344

Version

2.8.4

License

ISC

Unpacked Size

5.58 MB

Total Files

18

Last publish

Collaborators

  • phara0h