This repository has been archived by the owner on May 10, 2024. It is now read-only.
forked from IMI-Tool-Project/imi-enrichment-address
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from terass-inc/fature/versionup-with-change-ex…
…port バージョン・パッケージ・exports更新
- Loading branch information
Showing
11 changed files
with
2,287 additions
and
486 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/usr/bin/env node | ||
|
||
const commandLineArgs = require("command-line-args"); | ||
|
||
const enrichmentAddress = require("../main"); | ||
|
||
const options = commandLineArgs([ | ||
{ | ||
name: "string", | ||
alias: "s", | ||
type: String, | ||
typeLabel: "{underline string}", | ||
description: "変換対象とする住所文字列", | ||
}, | ||
]); | ||
|
||
const sleep = (millisecond = 3000) => | ||
new Promise((resolve) => setTimeout(resolve, millisecond)); | ||
|
||
(async function main() { | ||
console.info("Creating imi-enrichment-address instance"); | ||
await sleep(); | ||
|
||
const text = options.string; | ||
|
||
if (typeof text !== "string") throw new Error("required string type"); | ||
if (text === "") throw new Error("required string values"); | ||
|
||
// const result = await instance.convert(text); | ||
const result = await enrichmentAddress.convert(text); | ||
console.info("Result", result); | ||
|
||
console.info("Closing imi-enrichment-address instance"); | ||
await sleep(); | ||
|
||
enrichmentAddress.disconnect(); | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.