ng-streets
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

ng-streets

A utility library for retrieving Nigerian states, local government areas and street data.

Getting Started

Prerequisites

  • Node (>=8.10.0)
  • npm or Yarn

Installing

Add the package to your project from the npm registry using npm or yarn with

npm install ng-streets

or

yarn add ng-streets

How to use

Data types
State: <name: string, geoPol: string, areas: Array<Area>>
Area: <name: string, streets: Array<Street>>
Street: <name:string>

Methods

getStates Returns an array of the contained data of every state in Nigeria.
const { getStates } = require('ng-streets');

const data = getStates();
console.log(data);
/*
[
  {name: 'Abia', geoPol: 'South East', areas; [...]},
  ...,
 {name: 'Zamfara', geoPol: 'North West', areas; [...]}
]
*/
getState Returns the contained data of a state in the dataset.
  • name name of the state
const { getState } = require('ng-streets');

const data = getState('lagos');
console.log(data);
// {name: 'Lagos', geoPol: 'South West', areas; [...]}

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

To add street data without modifying the codebase, please fill the Nigerian Streets Data form.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

See also the list of contributors who participated in this project.

Package Sidebar

Install

npm i ng-streets

Weekly Downloads

4

Version

1.0.0

License

MIT

Unpacked Size

312 kB

Total Files

28

Last publish

Collaborators

  • sudo_kaizen