11 |
--------------------------------------------------------------------------------
/node_modules/speedtest-net/node_modules/xml2js/node_modules/sax/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | **NO PATCHES WITHOUT A TEST**
2 |
3 | **TEST MUST PASS WITH THE PATCH.**
4 |
5 | **TEST MUST FAIL WITHOUT THE PATCH.**
6 |
7 | **NO EXCEPTIONS.**
8 |
9 | # EVERY PULL REQUEST MUST HAVE A TEST.
10 |
11 | Seriously. This is a very strict rule, and I will not bend it for any
12 | patch, no matter how minor.
13 |
14 | Write a test.
15 |
--------------------------------------------------------------------------------
/node_modules/speedtest-net/node_modules/xml2js/node_modules/sax/LICENSE:
--------------------------------------------------------------------------------
1 | The ISC License
2 |
3 | Copyright (c) Isaac Z. Schlueter and Contributors
4 |
5 | Permission to use, copy, modify, and/or distribute this software for any
6 | purpose with or without fee is hereby granted, provided that the above
7 | copyright notice and this permission notice appear in all copies.
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
15 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 |
--------------------------------------------------------------------------------
/node_modules/speedtest-net/node_modules/xml2js/node_modules/sax/examples/example.js:
--------------------------------------------------------------------------------
1 |
2 | var fs = require("fs"),
3 | util = require("util"),
4 | path = require("path"),
5 | xml = fs.readFileSync(path.join(__dirname, "test.xml"), "utf8"),
6 | sax = require("../lib/sax"),
7 | strict = sax.parser(true),
8 | loose = sax.parser(false, {trim:true}),
9 | inspector = function (ev) { return function (data) {
10 | console.error("%s %s %j", this.line+":"+this.column, ev, data);
11 | }};
12 |
13 | sax.EVENTS.forEach(function (ev) {
14 | loose["on"+ev] = inspector(ev);
15 | });
16 | loose.onend = function () {
17 | console.error("end");
18 | console.error(loose);
19 | };
20 |
21 | // do this in random bits at a time to verify that it works.
22 | (function () {
23 | if (xml) {
24 | var c = Math.ceil(Math.random() * 1000)
25 | loose.write(xml.substr(0,c));
26 | xml = xml.substr(c);
27 | process.nextTick(arguments.callee);
28 | } else loose.close();
29 | })();
30 |
--------------------------------------------------------------------------------
/node_modules/speedtest-net/node_modules/xml2js/node_modules/sax/examples/hello-world.js:
--------------------------------------------------------------------------------
1 | require("http").createServer(function (req, res) {
2 | res.writeHead(200, {"content-type":"application/json"})
3 | res.end(JSON.stringify({ok: true}))
4 | }).listen(1337)
5 |
--------------------------------------------------------------------------------
/node_modules/speedtest-net/node_modules/xml2js/node_modules/sax/examples/not-pretty.xml:
--------------------------------------------------------------------------------
1 |
2 | something blerm a bit down here
9 |
--------------------------------------------------------------------------------
/node_modules/speedtest-net/node_modules/xml2js/node_modules/sax/examples/test.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | testing the parser
6 |
7 |
8 |
9 | hello
10 |
11 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/node_modules/speedtest-net/node_modules/xml2js/node_modules/sax/test/attribute-name.js:
--------------------------------------------------------------------------------
1 | require(__dirname).test(
2 | { xml: ""
3 | , expect: [
4 | ["attribute", {
5 | name: "length"
6 | , value: "12345"
7 | , prefix: ""
8 | , local: "length"
9 | , uri: ""
10 | }]
11 | , ["opentag", {
12 | name: "root"
13 | , prefix: ""
14 | , local: "root"
15 | , uri: ""
16 | , attributes: {
17 | length: {
18 | name: "length"
19 | , value: "12345"
20 | , prefix: ""
21 | , local: "length"
22 | , uri: ""
23 | }
24 | }
25 | , ns: {}
26 | , isSelfClosing: false
27 | }]
28 | , ["closetag", "root"]
29 | ]
30 | , strict: true
31 | , opt: { xmlns: true }
32 | }
33 | )
34 |
--------------------------------------------------------------------------------
/node_modules/speedtest-net/node_modules/xml2js/node_modules/sax/test/cdata-chunked.js:
--------------------------------------------------------------------------------
1 |
2 | require(__dirname).test({
3 | expect : [
4 | ["opentag", {"name": "R","attributes": {}, "isSelfClosing": false}],
5 | ["opencdata", undefined],
6 | ["cdata", " this is character data "],
7 | ["closecdata", undefined],
8 | ["closetag", "R"]
9 | ]
10 | }).write("").close();
11 |
12 |
--------------------------------------------------------------------------------
/node_modules/speedtest-net/node_modules/xml2js/node_modules/sax/test/cdata-end-split.js:
--------------------------------------------------------------------------------
1 |
2 | require(__dirname).test({
3 | expect : [
4 | ["opentag", {"name": "R","attributes": {}, "isSelfClosing": false}],
5 | ["opencdata", undefined],
6 | ["cdata", " this is "],
7 | ["closecdata", undefined],
8 | ["closetag", "R"]
9 | ]
10 | })
11 | .write("")
13 | .write("")
14 | .close();
15 |
16 |
--------------------------------------------------------------------------------
/node_modules/speedtest-net/node_modules/xml2js/node_modules/sax/test/cdata-fake-end.js:
--------------------------------------------------------------------------------
1 |
2 | var p = require(__dirname).test({
3 | expect : [
4 | ["opentag", {"name": "R","attributes": {}, "isSelfClosing": false}],
5 | ["opencdata", undefined],
6 | ["cdata", "[[[[[[[[]]]]]]]]"],
7 | ["closecdata", undefined],
8 | ["closetag", "R"]
9 | ]
10 | })
11 | var x = ""
12 | for (var i = 0; i < x.length ; i ++) {
13 | p.write(x.charAt(i))
14 | }
15 | p.close();
16 |
17 |
18 | var p2 = require(__dirname).test({
19 | expect : [
20 | ["opentag", {"name": "R","attributes": {}, "isSelfClosing": false}],
21 | ["opencdata", undefined],
22 | ["cdata", "[[[[[[[[]]]]]]]]"],
23 | ["closecdata", undefined],
24 | ["closetag", "R"]
25 | ]
26 | })
27 | var x = ""
28 | p2.write(x).close();
29 |
--------------------------------------------------------------------------------
/node_modules/speedtest-net/node_modules/xml2js/node_modules/sax/test/cdata-multiple.js:
--------------------------------------------------------------------------------
1 |
2 | require(__dirname).test({
3 | expect : [
4 | ["opentag", {"name": "R","attributes": {}, "isSelfClosing": false}],
5 | ["opencdata", undefined],
6 | ["cdata", " this is "],
7 | ["closecdata", undefined],
8 | ["opencdata", undefined],
9 | ["cdata", "character data "],
10 | ["closecdata", undefined],
11 | ["closetag", "R"]
12 | ]
13 | }).write("").write("").close();
15 |
16 |
--------------------------------------------------------------------------------
/node_modules/speedtest-net/node_modules/xml2js/node_modules/sax/test/cdata.js:
--------------------------------------------------------------------------------
1 | require(__dirname).test({
2 | xml : "",
3 | expect : [
4 | ["opentag", {"name": "R","attributes": {}, "isSelfClosing": false}],
5 | ["opencdata", undefined],
6 | ["cdata", " this is character data "],
7 | ["closecdata", undefined],
8 | ["closetag", "R"]
9 | ]
10 | });
11 |
--------------------------------------------------------------------------------
/node_modules/speedtest-net/node_modules/xml2js/node_modules/sax/test/cyrillic.js:
--------------------------------------------------------------------------------
1 | require(__dirname).test({
2 | xml: '<Р>тестР>',
3 | expect: [
4 | ['opentag', {'name':'Р', attributes:{}, isSelfClosing: false}],
5 | ['text', 'тест'],
6 | ['closetag', 'Р']
7 | ]
8 | });
9 |
--------------------------------------------------------------------------------
/node_modules/speedtest-net/node_modules/xml2js/node_modules/sax/test/duplicate-attribute.js:
--------------------------------------------------------------------------------
1 | require(__dirname).test
2 | ( { xml :
3 | ""
4 | , expect :
5 | [ [ "attribute", { name: "ID", value: "hello" } ]
6 | , [ "opentag", { name: "SPAN",
7 | attributes: { ID: "hello" }, isSelfClosing: false } ]
8 | , [ "closetag", "SPAN" ]
9 | ]
10 | , strict : false
11 | , opt : {}
12 | }
13 | )
14 |
--------------------------------------------------------------------------------
/node_modules/speedtest-net/node_modules/xml2js/node_modules/sax/test/emoji.js:
--------------------------------------------------------------------------------
1 | // split high-order numeric attributes into surrogate pairs
2 | require(__dirname).test
3 | ( { xml : '🔥'
4 | , expect :
5 | [ [ 'opentag', { name: 'A', attributes: {}, isSelfClosing: false } ]
6 | , [ 'text', '\ud83d\udd25' ]
7 | , [ 'closetag', 'A' ]
8 | ]
9 | , strict : false
10 | , opt : {}
11 | }
12 | )
13 |
--------------------------------------------------------------------------------
/node_modules/speedtest-net/node_modules/xml2js/node_modules/sax/test/end_empty_stream.js:
--------------------------------------------------------------------------------
1 | var assert = require('assert');
2 | var saxStream = require('../lib/sax').createStream();
3 | assert.doesNotThrow(function() {
4 | saxStream.end();
5 | });
6 |
--------------------------------------------------------------------------------
/node_modules/speedtest-net/node_modules/xml2js/node_modules/sax/test/entities.js:
--------------------------------------------------------------------------------
1 | require(__dirname).test({
2 | xml: '⌋ ' +
3 | '♠ © → & ' +
4 | '< < < < < > ℜ ℘ €',
5 | expect: [
6 | ['opentag', {'name':'R', attributes:{}, isSelfClosing: false}],
7 | ['text', '⌋ ♠ © → & < < < < < > ℜ ℘ €'],
8 | ['closetag', 'R']
9 | ]
10 | });
11 |
--------------------------------------------------------------------------------
/node_modules/speedtest-net/node_modules/xml2js/node_modules/sax/test/entity-mega.js:
--------------------------------------------------------------------------------
1 | var sax = require('../');
2 | var xml = '';
3 | var text = '';
4 | for (var i in sax.ENTITIES) {
5 | xml += '&' + i + ';'
6 | text += sax.ENTITIES[i]
7 | }
8 | xml += ''
9 | require(__dirname).test({
10 | xml: xml,
11 | expect: [
12 | ['opentag', {'name':'R', attributes:{}, isSelfClosing: false}],
13 | ['text', text],
14 | ['closetag', 'R']
15 | ]
16 | });
17 |
--------------------------------------------------------------------------------
/node_modules/speedtest-net/node_modules/xml2js/node_modules/sax/test/flush.js:
--------------------------------------------------------------------------------
1 | var parser = require(__dirname).test({
2 | expect: [
3 | ['opentag', {'name':'T', attributes:{}, isSelfClosing: false}],
4 | ['text', 'flush'],
5 | ['text', 'rest'],
6 | ['closetag', 'T'],
7 | ]
8 | });
9 |
10 | parser.write('flush');
11 | parser.flush();
12 | parser.write('rest');
13 | parser.close();
14 |
--------------------------------------------------------------------------------
/node_modules/speedtest-net/node_modules/xml2js/node_modules/sax/test/issue-30.js:
--------------------------------------------------------------------------------
1 | // https://github.com/isaacs/sax-js/issues/33
2 | require(__dirname).test
3 | ( { xml : "\n"+
4 | "\n"+
7 | "\n"+
8 | ""
9 |
10 | , expect :
11 | [ [ "opentag", { name: "xml", attributes: {}, isSelfClosing: false } ]
12 | , [ "text", "\n" ]
13 | , [ "comment", " \n comment with a single dash- in it\n" ]
14 | , [ "text", "\n" ]
15 | , [ "opentag", { name: "data", attributes: {}, isSelfClosing: true } ]
16 | , [ "closetag", "data" ]
17 | , [ "text", "\n" ]
18 | , [ "closetag", "xml" ]
19 | ]
20 | , strict : true
21 | , opt : {}
22 | }
23 | )
24 |
25 |
--------------------------------------------------------------------------------
/node_modules/speedtest-net/node_modules/xml2js/node_modules/sax/test/issue-35.js:
--------------------------------------------------------------------------------
1 | // https://github.com/isaacs/sax-js/issues/35
2 | require(__dirname).test
3 | ( { xml : "
\n"+
4 | ""
5 |
6 | , expect :
7 | [ [ "opentag", { name: "xml", attributes: {}, isSelfClosing: false } ]
8 | , [ "text", "\r\r\n" ]
9 | , [ "closetag", "xml" ]
10 | ]
11 | , strict : true
12 | , opt : {}
13 | }
14 | )
15 |
16 |
--------------------------------------------------------------------------------
/node_modules/speedtest-net/node_modules/xml2js/node_modules/sax/test/issue-47.js:
--------------------------------------------------------------------------------
1 | // https://github.com/isaacs/sax-js/issues/47
2 | require(__dirname).test
3 | ( { xml : ''
4 | , expect : [
5 | [ "attribute", { name:'HREF', value:"query.svc?x=1&y=2&z=3"} ],
6 | [ "opentag", { name: "A", attributes: { HREF:"query.svc?x=1&y=2&z=3"}, isSelfClosing: true } ],
7 | [ "closetag", "A" ]
8 | ]
9 | , opt : {}
10 | }
11 | )
12 |
13 |
--------------------------------------------------------------------------------
/node_modules/speedtest-net/node_modules/xml2js/node_modules/sax/test/issue-84.js:
--------------------------------------------------------------------------------
1 | // https://github.com/isaacs/sax-js/issues/49
2 | require(__dirname).test
3 | ( { xml : "body"
4 | , expect :
5 | [ [ "processinginstruction", { name: "has", body: "unbalanced \"quotes" } ],
6 | [ "opentag", { name: "xml", attributes: {}, isSelfClosing: false } ]
7 | , [ "text", "body" ]
8 | , [ "closetag", "xml" ]
9 | ]
10 | , strict : false
11 | , opt : { lowercasetags: true, noscript: true }
12 | }
13 | )
14 |
--------------------------------------------------------------------------------
/node_modules/speedtest-net/node_modules/xml2js/node_modules/sax/test/issue-86.js:
--------------------------------------------------------------------------------
1 | require(__dirname).test
2 | ( { xml : "abcdeabcde