presidium 1.2.1 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/Docker.js +1 -1
  2. package/XML.js +21 -3
  3. package/package.json +1 -1
package/Docker.js CHANGED
@@ -38,7 +38,7 @@ class Docker {
38
38
  maxSockets: Infinity,
39
39
  })
40
40
 
41
- this.http = new HTTP('http://0.0.0.0/v1.40', { agent })
41
+ this.http = new HTTP('http://0.0.0.0/v1.52', { agent })
42
42
  }
43
43
 
44
44
  /**
package/XML.js CHANGED
@@ -2,9 +2,7 @@
2
2
  * @name XML
3
3
  *
4
4
  * @docs
5
- * ```coffeescript [specscript]
6
- * XML object
7
- * ```
5
+ * Presidium XML class.
8
6
  */
9
7
  const XML = {}
10
8
 
@@ -253,6 +251,26 @@ function _convert(ast) {
253
251
  * XML.parse(xml string) -> data NestedObject
254
252
  * XML.parse(xml string, options { ast: true }) -> ast RootAST
255
253
  * ```
254
+ *
255
+ * Parses [XML](https://en.wikipedia.org/wiki/XML) into JSON data.
256
+ *
257
+ * Arguments:
258
+ * * `xml` - an XML string.
259
+ * * `options`
260
+ * * `ast` - whether to return an AST (Abstract Syntax Tree) of the XML string.
261
+ *
262
+ * Return:
263
+ * * `data` - the JSON data parsed from the `xml` string, or if `ast` is true, the AST (Abstract Syntax Tree) of the XML string.
264
+ *
265
+ * ```javascript
266
+ * const data = XML.parse(`
267
+ * <Example a="1">
268
+ * <Attr>Content</Attr>
269
+ * </Example>
270
+ * `)
271
+ *
272
+ * console.log(data) // { Example: { Attr: 'Content', a: '1' } }
273
+ * ```
256
274
  */
257
275
  XML.parse = function parse(xml, options = {}) {
258
276
  xml = xml.replace(/\n/g, '')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "presidium",
3
- "version": "1.2.1",
3
+ "version": "1.3.0",
4
4
  "description": "A library for creating web services",
5
5
  "author": "Richard Tong",
6
6
  "license": "MIT",