GithubHelp home page GithubHelp logo

orimdominic / ng-streets Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 165 KB

A utility library for retrieving Nigerian states, local government areas, and street names. (help wanted

Home Page: https://www.npmjs.com/package/ng-streets

JavaScript 25.32% TypeScript 74.68%
nigeria street areas state location local-government npm ng-streets nigerian-states

ng-streets's Introduction

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.

ng-streets's People

Contributors

orimdominic avatar

Stargazers

 avatar

Watchers

 avatar

ng-streets's Issues

all states data

The current API getStates retrieves (only) the name of all the states.
Modify it to retireve the data of all the states

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.