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 7378972 commit e00ff52
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ jobs:
strategy:
matrix:
node:
- lts/dubnium
- lts/erbium
- node
20 changes: 9 additions & 11 deletions build.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,17 +89,15 @@ function onconcat(body) {
var toB = {}
var toT = {}
var to1 = {}

data.forEach((d) => {
var id = d.iso6393
var b = d.iso6392B
var t = d.iso6392T
var i = d.iso6391

if (b) toB[id] = b
if (t) toT[id] = t
if (i) to1[id] = i
})
var index = -1
var d

while (++index < data.length) {
d = data[index]
if (d.iso6392B) toB[d.iso6393] = d.iso6392B
if (d.iso6392T) toT[d.iso6393] = d.iso6392T
if (d.iso6391) to1[d.iso6393] = d.iso6391
}

write('index', data)
write('to-1', to1)
Expand Down
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"repository": "wooorm/iso-639-3",
"bugs": "https://github.com/wooorm/iso-639-3/issues",
"funding": {
"type": "github",
"url": "https://github.com/sponsors/wooorm"
"type": "github",
"url": "https://github.com/sponsors/wooorm"
},
"author": "Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)",
"contributors": [
Expand All @@ -30,7 +30,6 @@
"to-2b.json",
"to-2t.json"
],
"dependencies": {},
"devDependencies": {
"bail": "^1.0.0",
"browserify": "^17.0.0",
Expand All @@ -41,7 +40,7 @@
"remark-preset-wooorm": "^8.0.0",
"tape": "^5.0.0",
"tinyify": "^3.0.0",
"xo": "^0.37.0",
"xo": "^0.38.0",
"yauzl": "^2.0.0"
},
"scripts": {
Expand Down
24 changes: 13 additions & 11 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,23 @@ var test = require('tape')
var iso6393 = require('.')

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

t.plan(8)

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

iso6393.forEach(function (language) {
if (language.iso6393 !== 'eng') {
return
while (++index < iso6393.length) {
if (iso6393[index].iso6393 !== 'eng') {
continue
}

t.equal(language.iso6393, 'eng', 'should have a 639-3 code')
t.equal(language.iso6392B, 'eng', 'should have a 639-2B code')
t.equal(language.iso6392T, 'eng', 'should have a 639-2T code')
t.equal(language.iso6391, 'en', 'should have a 639-1 code')
t.equal(language.scope, 'individual', 'should have a scope')
t.equal(language.type, 'living', 'should have a type')
t.equal(language.name, 'English', 'should have a name')
})
t.equal(iso6393[index].iso6393, 'eng', 'should have a 639-3 code')
t.equal(iso6393[index].iso6392B, 'eng', 'should have a 639-2B code')
t.equal(iso6393[index].iso6392T, 'eng', 'should have a 639-2T code')
t.equal(iso6393[index].iso6391, 'en', 'should have a 639-1 code')
t.equal(iso6393[index].scope, 'individual', 'should have a scope')
t.equal(iso6393[index].type, 'living', 'should have a type')
t.equal(iso6393[index].name, 'English', 'should have a name')
}
})

0 comments on commit e00ff52

Please sign in to comment.