git ssb

1+

cel / wpa-conf-codec



Commit master

Document API and CLI

cel committed on 2/16/2017, 12:23:41 AM
Parent: 9581a2d0f866b1ec4a9522a4e678d8c5452ffac6

Files changed

README.mdchanged
README.mdView
@@ -10,8 +10,32 @@
1010 console.log(conf.decode(conf))
1111 console.log(conf.encode(conf.decode(conf)))
1212 ```
1313
14 +## API
15 +
16 +### `wpa.decode(str): obj`
17 +
18 +Decode wpa config
19 +
20 +- `str`: string of `wpa_supplicant.conf` data
21 +- `obj`: config converted into a JS object
22 +
23 +### `wpa.encode(obj): str`
24 +
25 +Encode wpa config
26 +
27 +- `obj`: config as a JS object
28 +- `str`: string of `obj` converted into `wpa_supplicant.conf` format
29 +
30 +### CLI
31 +
32 +A command-line program is provided that converts between a config in
33 +`wpa_supplicant.conf` format and JSON format, using standard I/O.
34 +
35 +- `wpa-conf decode`: convert conf to json
36 +- `wpa-conf encode`: convert json to conf
37 +
1438 [wpa_supplicant.conf]: https://w1.fi/cgit/hostap/tree/wpa_supplicant/wpa_supplicant.conf
1539 [POJOs]: http://odetocode.com/blogs/scott/archive/2012/02/27/plain-old-javascript.aspx
1640
1741 ## License

Built with git-ssb-web