-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
46 lines (29 loc) · 945 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*
_____ .___.__
_/ ____\___________ __| _/|__| ____________ ___________
\ __\/ __ \_ __ \/ __ | | | / _ \___ // __ \_ __ \
| | \ ___/| | \/ /_/ | | | ( <_> ) /\ ___/| | \/
|__| \___ >__| \____ | |__| \____/_____ \\___ >__|
\/ \/ \/ \/
*/
'use strict';
var lib = require("./lib")
var allData = new lib.MyLib().setInitDataFromXlsx() || []
var formattedData = allData.map(v => {
return {
il: v.il.trim(),
ilce: v.ilçe.trim(),
semt: v.semt_bucak_belde.trim(),
mahalle: v.Mahalle.trim(),
posta_kodu: v.PK.trim()
}
})
new lib.MyLib().setInitJson(formattedData)
module.exports = {
getAllData: formattedData
}
//NOTE
//https://postakodu.ptt.gov.tr/Dosyalar/pk_list.zip
// TEST
// getData: [],
// setMyTest: new lib.MyLib().setInitDataFromXlsx()