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

niger-city

v1.0.0

Published

Get cities and states in Nigeria for Delivery purpose :)

Downloads

4

Readme

NIGER-CITY

Hey am shaw from Alpha02.Today I will be teaching how to integrate NigerDelivery on any javascript work frame like reactjs.e.t.c.

LET START WITH JAVASCRIPT

In your HTML code we need to paste the following default code:

<div class="niger">
    <select  id="niger"
     onfocus="nigerfocus()" 
     onchange="handlechange(event)"
     ><option>#Default</option></select>
     <hr/>
     <select  id="nigerr"
     onchange="handlechangee()"
     
     ></select>
     <span id="sc">@</span>
    </div>

After pasting the code the next step is to install niger-city by running this command: npm i niger-city.You have to have node installed before running this command.

HOW TO USE NIGER-CITY

To use niger-city we need to paste the default code in your javascript file:

const {nigerfocus,handlechange,handlechangee}=require("niger-city");

In he above code nigerfocus handles the focus method - handlechange handles the city - hnadlechangee handles the town and get the km needed.To calculate the amount, we need to first get the kilometre by the below code:

var x = document.getElementById("nigerr");
// you can name the variable
//By default niger-city has a const value for one km in all cities.
var onekm = 11.4;
function handleAmount(){
    var x = document.getElementById("nigerr");
   var amount =  x.value * onekm;
   console.log(amount + "AMOUNT");
   return amount;
   
}

HOW TO USE NIGER-CITY ON REACTJS

The following code is needed when using react:

import {nigerfocus,handlechange,handlechangee,nigerKm} from "niger-city";
function App(){
const[km,setKm]=useState(nigerKm());
const oneKm = 11.4;
const[amount,setAmount]=useState(0);
const handleAmount=(e)=>{
  setAmount(oneKm * km);
}
    return(
<div class="niger">
  <select  id="niger"
   onfocus={nigerfocus} 
   onchange={(e)=>handlechange(e)}
   ><option>#Default</option></select>
   <hr/>
   <select  id="nigerr"
   onchange={(e)=>handlechangee(e)}
   
   ></select>
   <button onClick={(e)=>handleAmount(e)}>Get Amount</button>
   <span id="sc">{km} and {amount}</span>
  </div>);
  
  };

The handleAmount setAmount to oneKm * km.

For more information or help call:08165728539, email:[email protected]. Am shaw from Alpha02.