Skip to content

Commit

Permalink
feat(refactor): remove alpha3
Browse files Browse the repository at this point in the history
  • Loading branch information
missinglink committed Jul 6, 2017
1 parent fd3f9e0 commit 052e74f
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 87 deletions.
20 changes: 0 additions & 20 deletions Document.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,26 +142,6 @@ Document.prototype.getSourceId = function(){
return this.source_id;
};

// alpha3
Document.prototype.setAlpha3 = function( alpha3 ){

alpha3 = transform.uppercase(alpha3);
validate.type('string', alpha3);
validate.truthy(alpha3);
validate.length(3, alpha3);

this.alpha3 = alpha3;
return this;
};

Document.prototype.getAlpha3 = function(){
return this.alpha3;
};

Document.prototype.clearAlpha3 = function(){
delete this.alpha3;
};

// globally unique id
Document.prototype.getGid = function(){
return [ this.getSource(), this.getLayer(), this.getId() ].join(':');
Expand Down
64 changes: 0 additions & 64 deletions test/document/alpha3.js

This file was deleted.

1 change: 0 additions & 1 deletion test/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ var common = {};
var tests = [
require('./Document.js'),
require('./errors.js'),
require('./document/alpha3.js'),
require('./document/centroid.js'),
require('./document/gid.js'),
require('./document/id.js'),
Expand Down
2 changes: 0 additions & 2 deletions test/serialize/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ module.exports.tests.complete = function(test) {

// create a new doc and serialize it
var doc = new Document( 'geoname', 'venue', 1003 )
.setAlpha3( 'GBR' )
.setMeta( 'author', 'peter' )
.setName( 'default', 'Hackney City Farm' )
.setName( 'alt', 'Haggerston City Farm' )
Expand Down Expand Up @@ -74,7 +73,6 @@ module.exports.tests.complete = function(test) {
// data partitioning
'source': 'geoname',
'layer': 'venue',
'alpha3': 'GBR',

// place name (ngram analysis)
'name':{
Expand Down

0 comments on commit 052e74f

Please sign in to comment.