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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@ken-all/kenall

v2.3.1

Published

KENALL JavaScript SDK

Downloads

49,236

Readme

kenall-js

What's this?

kenall-js is a JavaScript client library for KEN ALL, Japan postal code to address translation API service.

API document is here.

How to use

There are two options to use kenall-js in your project. The one is to put a <script> tag referring to the script bundle somewhere atop of your HTML file to invoke the API from within your script, and the other is to specify kenall package as a dependency in your Node.js project's package.json.

Usage from within the plain-old JavaScript

[!NOTE] As of v2.0.0, Internet Explorer is no longer supported.

All you need is put a <script> tag that refers to the script bundle as follows:

<script type="text/javascript" src="LOCATION-TO-THE-SCRIPT-BUNDLE"></script>

This adds a property kenall to the global window object, from which you can refer to KENALL constructor to create the object that works as the interface. Look at the following example to see what it goes like.

Note that you need to upload the script bundle beforehand somewhere accessible from the browser.

<script type="text/javascript">
function fill(form) {
  // You can obtain the API key from the dashboard at kenall.jp/home
  const k = new kenall.KENALL('API_KEY');
  const postalCode = form.elements["postalcode"].value;
  k.getAddress(postalCode).then(
    function (address) {
      const firstCandidate = address.data[0];
      form.elements["prefecture"].value = firstCandidate["prefecture"];
    }
  ).catch(function () {
    alert("Failed to invoke the API");
  });
}
</script>

The script bundle can be downloaded at the release page.

Alternatively, you can use the following URL for the latest bundle. Beware that we don't provide any warranty on its availability, though we'll put as much effort as possible for keeping it up.

Previous versions:

Usage in a Node.js project

@ken-all/kenall requires Node.js 20 or later in Node.js environments because it relies on the native Fetch API.

Run

$ npm i @ken-all/kenall

to add kenall.js as a dependency for your project.

Then you can use it like the following:

const { KENALL } = require('@ken-all/kenall');

// You can obtain the API key from the dashboard at kenall.jp/home
const api = new KENALL('API_KEY');
api.getAddress(postalCode).then(
  r => {
    console.log(r);
  }
).catch(
  e => {
    console.error(e);
  }
);

or either in TypeScript,

import { KENALL } from '@ken-all/kenall';

const kenall = new KENALL('API_KEY');
const r = await kenall.getAddress(postalCode);
console.log(r);

Building

Run

$ npm run build

to generate JavaScript scripts under dist/. If you want to get the bundle, run

$ npm run bundle

and you'll find one under dist/.

Tests

$ npm run test

Examples & Demos

  • https://ken-all.github.io/kenall-js-demo/
  • https://github.com/KEN-ALL/kenall-js/tree/master/examples