Skip to content

Commit dbe598e

Browse files
authored
bump dependencies (xmppjs#112)
1 parent ff770ee commit dbe598e

File tree

6 files changed

+2280
-9
lines changed

6 files changed

+2280
-9
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
!.npmignore
44
!.travis.yml
55

6+
dist/
67
node_modules/
78

89
bundle.js
9-
yarn.lock

benchmarks/ltx.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/*
44
benchmark the speed of the different methods to create elements
55
Not all tests are equally functional but it gives a good idea of what to expect from
6-
the different techniques.
6+
the different methods.
77
*/
88

99
var benchmark = require('benchmark')
@@ -23,11 +23,13 @@ var el = parse(XML)
2323
var suite = new benchmark.Suite('ltx')
2424

2525
suite.add('tag with template literal', function () {
26+
/* eslint-disable */
2627
tag`
2728
<message to="${'foo@bar'}" from="${'bar@foo'}" type="${'chat'}" id="${'foobar'}">
2829
<body>${'Where there is love there is life.'}</body>
2930
</message>
3031
`
32+
/* eslint-enable */
3133
})
3234

3335
suite.add('tag with direct call', function () {

dist/.gitkeep

Whitespace-only changes.

package.json

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,11 @@
1515
"Sonny Piers"
1616
],
1717
"license": "MIT",
18-
"engine": "node",
1918
"scripts": {
2019
"prepublish": "npm run bundle",
2120
"preversion": "npm test",
2221
"benchmark": "node benchmarks/",
23-
"bundle": "browserify -s ltx index.js -o bundle.js",
22+
"bundle": "browserify -s ltx index.js -o bundle.js && cp bundle.js dist/ltx.js",
2423
"unit": "vows --spec",
2524
"lint": "standard",
2625
"test": "npm run unit && npm run lint && npm run bundle"
@@ -29,14 +28,14 @@
2928
"inherits": "^2.0.1"
3029
},
3130
"devDependencies": {
32-
"benchmark": "^2.1.0",
33-
"browserify": "^13.0.1",
34-
"libxmljs": "^0.18.0",
31+
"benchmark": "^2.1.3",
32+
"browserify": "^14.1.0",
33+
"libxmljs": "^0.18.4",
3534
"microtime": "^2.1.2",
3635
"node-expat": "^2.3.13",
3736
"node-xml": "^1.0.2",
38-
"sax": "^1.1.5",
39-
"standard": "^8.5.0",
37+
"sax": "^1.2.2",
38+
"standard": "^9.0.0",
4039
"vows": "^0.8.1"
4140
}
4241
}

test/stringify-test.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,31 @@ vows.describe('stringify').addBatch({
3535

3636
assert.equal(stringify(el, 2), expected)
3737
assert.equal(stringify(el, ' '), expected)
38+
},
39+
'ignores empty string children': function () {
40+
const el = {
41+
name: 'foo',
42+
attrs: {},
43+
children: ['', 'bar', '']
44+
}
45+
assert.equal(stringify(el), '<foo>bar</foo>')
46+
},
47+
'ignores deep empty string children': function () {
48+
const el = {
49+
name: 'foo',
50+
attrs: {},
51+
children: [
52+
'',
53+
{
54+
name: 'bar',
55+
attrs: {},
56+
children: [
57+
'', '', ''
58+
]
59+
},
60+
''
61+
]
62+
}
63+
assert.equal(stringify(el), '<foo><bar></bar></foo>')
3864
}
3965
}).export(module)

0 commit comments

Comments
 (0)