UNPKG

391 BMarkdownView Raw
1# FlexHosts
2
3> Support Mac OS X, Windows, Linux
4
5```
6var flexHosts = require("flex-hosts");
7
8flexHosts(hostsMap, [dir,] function (err, hosts) {
9 ...
10});
11```
12
13## Arguments
14
15### hostsMap
16
17```
18{
19 "127.0.0.1": [
20 "g.cdn.cn",
21 "a.cdn.cn"
22 ],
23 "127.0.0.2": "t.cdn.cn o.cdn.cn"
24}
25```
26
27* The value relevant to key could be Array or String.
28
29### [dir]
30
31The DIR where puts the hostsMap file