1.0.0 • Published 7 years ago

zipcode-taiwan v1.0.0

Weekly downloads
4
License
MIT
Repository
github
Last release
7 years ago

zipcode-taiwan

Used to get Taiwan's zip code table

NPM

Installation

Install via NPM:

npm install zipcode-taiwan

Usage

var zipcodeTW = require('zipcode-taiwan');

// Fetching raw data
var fetcher = zipcodeTW.fetch();

// Creating a parser to convert raw data to JavaScript object
var parser = zipcodeTW.parse();

parser.on('data', function(data) {
    console.log(data);
});

fetcher.pipe(parser);

Support Stream and Pipe

Here is an example to use stream/pipe to convert data and output string to a file.

var fs = require('fs');
var zipcodeTW = require('zipcode-taiwan');

weatherTW
    .fetch()
    .pipe(zipcodeTW.parse({ outputString: true }))
    .pipe(fs.createWriteStream('zipcode.json'));

License

Licensed under the MIT License

Authors

Copyright(c) 2017 Fred Chien <cfsghost@gmail.com>