+7
-0
@@ -5,2 +5,9 @@ # Changelog | ||
| ### [0.2.1](https://github.com/numb86/ken-all/compare/v0.2.0...v0.2.1) (2020-02-21) | ||
| ### Dependencies | ||
| * 依存パッケージのバージョンを上げる ([#25](https://github.com/numb86/ken-all/issues/25)) ([31458b8](https://github.com/numb86/ken-all/commit/31458b825a1a41bb1dd1f7e76f6df29fe151dd3a)) | ||
| ## [0.2.0](https://github.com/numb86/ken-all/compare/v0.1.2...v0.2.0) (2019-10-10) | ||
@@ -7,0 +14,0 @@ |
@@ -0,4 +1,6 @@ | ||
| declare type Address = [string, string, string, string]; | ||
| export declare type NormalizedAddress = [string, string, string]; | ||
| export declare const generateAddressListFromText: (rawData: string) => [string, string, string, string][]; | ||
| export declare const extractTargetAddress: (postCodeBack: string, addressList: [string, string, string, string][]) => [string, string, string, string][]; | ||
| export declare const normalizeAddressList: (addressList: [string, string, string, string][]) => [string, string, string][]; | ||
| export declare const generateAddressListFromText: (rawData: string) => Address[]; | ||
| export declare const extractTargetAddress: (postCodeBack: string, addressList: Address[]) => Address[]; | ||
| export declare const normalizeAddressList: (addressList: Address[]) => NormalizedAddress[]; | ||
| export {}; |
+2
-1
@@ -1,2 +0,3 @@ | ||
| declare const KenAll: (postCode: string) => Promise<[string, string, string][]>; | ||
| import { NormalizedAddress } from './address'; | ||
| declare const KenAll: (postCode: string) => Promise<NormalizedAddress[]>; | ||
| export default KenAll; |
+5
-3
@@ -0,4 +1,6 @@ | ||
| declare type Address = [string, string, string, string]; | ||
| export declare type NormalizedAddress = [string, string, string]; | ||
| export declare const generateAddressListFromText: (rawData: string) => [string, string, string, string][]; | ||
| export declare const extractTargetAddress: (postCodeBack: string, addressList: [string, string, string, string][]) => [string, string, string, string][]; | ||
| export declare const normalizeAddressList: (addressList: [string, string, string, string][]) => [string, string, string][]; | ||
| export declare const generateAddressListFromText: (rawData: string) => Address[]; | ||
| export declare const extractTargetAddress: (postCodeBack: string, addressList: Address[]) => Address[]; | ||
| export declare const normalizeAddressList: (addressList: Address[]) => NormalizedAddress[]; | ||
| export {}; |
+2
-1
@@ -1,2 +0,3 @@ | ||
| declare const KenAll: (postCode: string) => Promise<[string, string, string][]>; | ||
| import { NormalizedAddress } from './address'; | ||
| declare const KenAll: (postCode: string) => Promise<NormalizedAddress[]>; | ||
| export default KenAll; |
+14
-10
| { | ||
| "name": "ken-all", | ||
| "version": "0.2.0", | ||
| "version": "0.2.1", | ||
| "description": "Ken All は、郵便番号で住所を検索できる npm パッケージです。", | ||
@@ -10,2 +10,6 @@ "keywords": [ | ||
| ], | ||
| "engines": { | ||
| "node": ">=12.13.0", | ||
| "yarn": ">=1.19.0" | ||
| }, | ||
| "homepage": "https://github.com/numb86/ken-all", | ||
@@ -51,5 +55,5 @@ "bugs": { | ||
| "devDependencies": { | ||
| "@commitlint/cli": "^8.0.0", | ||
| "@commitlint/config-conventional": "^8.0.0", | ||
| "@types/mocha": "^5.2.7", | ||
| "@commitlint/cli": "^8.3.5", | ||
| "@commitlint/config-conventional": "^8.3.4", | ||
| "@types/mocha": "^7.0.1", | ||
| "@typescript-eslint/eslint-plugin": "^2.3.3", | ||
@@ -60,10 +64,10 @@ "@typescript-eslint/parser": "^2.3.3", | ||
| "espower-typescript": "^9.0.2", | ||
| "iconv-lite": "^0.5.0", | ||
| "mocha": "^6.1.4", | ||
| "iconv-lite": "^0.5.1", | ||
| "mocha": "^7.0.1", | ||
| "npm-run-all": "^4.1.5", | ||
| "power-assert": "^1.6.1", | ||
| "standard-version": "^6.0.1", | ||
| "standard-version": "^7.1.0", | ||
| "ts-loader": "^6.2.0", | ||
| "ts-node": "^8.3.0", | ||
| "webpack": "^4.41.0", | ||
| "ts-node": "^8.4.1", | ||
| "webpack": "4.41.3", | ||
| "webpack-cli": "^3.3.9" | ||
@@ -75,4 +79,4 @@ }, | ||
| "fetch-ponyfill": "^6.1.0", | ||
| "typescript": "^3.6.3" | ||
| "typescript": "^3.8.2" | ||
| } | ||
| } |
+45
-3
@@ -70,5 +70,6 @@ <div align="center"> | ||
| ## React (バージョン`16.8.6`で確認) | ||
| ## React | ||
| ```js | ||
| // React のバージョン 16.10.2 で確認 | ||
| import React, {useState} from 'react'; | ||
@@ -110,3 +111,3 @@ import ReactDOM from 'react-dom'; | ||
| ## Vue (バージョン`2.6.10`で確認) | ||
| ## Vue | ||
@@ -116,2 +117,3 @@ エントリポイント。 | ||
| ```js | ||
| // Vue のバージョン 2.6.10 で確認 | ||
| import Vue from 'vue'; | ||
@@ -169,5 +171,6 @@ | ||
| ## Node.js (バージョン`8.16.0`で確認) | ||
| ## Node.js | ||
| ```js | ||
| // Node.js のバージョン 12.10.0 で確認 | ||
| const KenAll = require('ken-all').default; | ||
@@ -179,2 +182,41 @@ | ||
| ## script タグを使った読み込み | ||
| `0.2.0`以降のバージョンは`https://unpkg.com/ken-all@{バージョン番号}/umd/index.js`で読み込めます。 | ||
| 読み込み後、`KenAll.default`という形で利用できます。 | ||
| ```html | ||
| <!DOCTYPE html> | ||
| <html lang="ja"> | ||
| <head> | ||
| <meta charset="UTF-8"> | ||
| <title>Ken All Sample</title> | ||
| </head> | ||
| <body> | ||
| <input id="post-code" maxlength="7"> | ||
| <p id="result"></p> | ||
| <script src="https://unpkg.com/ken-all@0.2.0/umd/index.js"></script> | ||
| <script> | ||
| const searchBoxElem = document.querySelector('#post-code'); | ||
| searchBoxElem.addEventListener('input', e => { | ||
| const postCode = e.currentTarget.value; | ||
| if (postCode.length === 7) { | ||
| const resultTextElem = document.querySelector('#result'); | ||
| KenAll.default(postCode).then(res => { | ||
| if (res.length === 0) { | ||
| resultTextElem.textContent = '該当する住所はありません'; | ||
| } else { | ||
| resultTextElem.textContent = res[0].join(' '); | ||
| } | ||
| }); | ||
| } | ||
| }, false); | ||
| </script> | ||
| </body> | ||
| </html> | ||
| ``` | ||
| # 元データ | ||
@@ -181,0 +223,0 @@ |
47246
3.24%261
2.35%221
23.46%Updated