Skip to content

Commit

Permalink
Merge pull request #10 from jzhao67/master
Browse files Browse the repository at this point in the history
Add .json extensions
  • Loading branch information
mattcg authored Jun 8, 2022
2 parents b8320f6 + 2b982f5 commit 7ded6f7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions lib/Subtag.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

'use strict';

var index = require('language-subtag-registry/data/json/index');
var registry = require('language-subtag-registry/data/json/registry');
var index = require('language-subtag-registry/data/json/index.json');
var registry = require('language-subtag-registry/data/json/registry.json');

module.exports = Subtag;

Expand Down
4 changes: 2 additions & 2 deletions lib/Tag.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

'use strict';

var index = require('language-subtag-registry/data/json/index');
var registry = require('language-subtag-registry/data/json/registry');
var index = require('language-subtag-registry/data/json/index.json');
var registry = require('language-subtag-registry/data/json/registry.json');

var Subtag = require('./Subtag');

Expand Down
8 changes: 4 additions & 4 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
var Tag = require('./Tag');
var Subtag = require('./Subtag');

var index = require('language-subtag-registry/data/json/index');
var registry = require('language-subtag-registry/data/json/registry');
var index = require('language-subtag-registry/data/json/index.json');
var registry = require('language-subtag-registry/data/json/registry.json');

var tags = function(tag) {
return new Tag(tag);
Expand Down Expand Up @@ -105,7 +105,7 @@ tags.languages = function(macrolanguage) {
var i, l, record, results = [];

macrolanguage = macrolanguage.toLowerCase();
if (!require('language-subtag-registry/data/json/macrolanguage')[macrolanguage]) {
if (!require('language-subtag-registry/data/json/macrolanguage.json')[macrolanguage]) {
throw new Error('\'' + macrolanguage + '\' is not a macrolanguage.');
}

Expand Down Expand Up @@ -138,5 +138,5 @@ tags.type = function(subtag, type) {
};

tags.date = function() {
return require('language-subtag-registry/data/json/meta')['File-Date'];
return require('language-subtag-registry/data/json/meta.json')['File-Date'];
};

0 comments on commit 7ded6f7

Please sign in to comment.