1.0.0 • Published 7 years ago
zipcode-taiwan v1.0.0
zipcode-taiwan
Used to get Taiwan's zip code table
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>
1.0.0
7 years ago