Skip to content

Commit

Permalink
Update dev-dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Mar 26, 2021
1 parent ca07294 commit d58808e
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 14 deletions.
19 changes: 10 additions & 9 deletions build.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,17 @@ function onconnection(response) {

function onconcat(buf) {
var dl = q.select('#elements-2 ~ dl dd', proc.parse(buf))
var nodes = q.selectAll('code', dl)
var index = -1
var value

q.selectAll('code', dl).forEach(each)
while (++index < nodes.length) {
value = toString(nodes[index])

fs.writeFile('index.json', JSON.stringify(list.sort(), 0, 2) + '\n', bail)
}

function each(node) {
var data = toString(node)

if (data && !/\s/.test(data) && !list.includes(data)) {
list.push(data)
if (value && !/\s/.test(value) && !list.includes(value)) {
list.push(value)
}
}

fs.writeFile('index.json', JSON.stringify(list.sort(), 0, 2) + '\n', bail)
}
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
"files": [
"index.json"
],
"dependencies": {},
"devDependencies": {
"bail": "^1.0.0",
"browserify": "^17.0.0",
Expand All @@ -41,7 +40,7 @@
"tape": "^5.0.0",
"tinyify": "^3.0.0",
"unified": "^9.0.0",
"xo": "^0.37.0"
"xo": "^0.38.0"
},
"scripts": {
"generate": "node build",
Expand Down
12 changes: 9 additions & 3 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,17 @@ var test = require('tape')
var htmlVoidElements = require('.')

test('htmlVoidElements', function (t) {
var index = -1

t.ok(Array.isArray(htmlVoidElements), 'should be an `array`')

htmlVoidElements.forEach(function (tagName) {
t.equal(typeof tagName, 'string', '`' + tagName + '` should be a string')
})
while (++index < htmlVoidElements.length) {
t.equal(
typeof htmlVoidElements[index],
'string',
'`' + htmlVoidElements[index] + '` should be a string'
)
}

t.end()
})

0 comments on commit d58808e

Please sign in to comment.