Browse Source

rename outputGenerator -> labelGenerator

pull/301/head
Peter Johnson 9 years ago
parent
commit
2b9c3d79aa
  1. 4
      helper/geojsonify.js
  2. 2
      helper/labelGenerator.js
  3. 0
      helper/labelSchema.json
  4. 2
      test/unit/helper/labelSchema.js
  5. 2
      test/unit/run.js

4
helper/geojsonify.js

@ -1,7 +1,7 @@
var GeoJSON = require('geojson'),
extent = require('geojson-extent'),
outputGenerator = require('./outputGenerator'),
labelGenerator = require('./labelGenerator'),
logger = require('pelias-logger').get('api'),
type_mapping = require('./type_mapping'),
_ = require('lodash');
@ -116,7 +116,7 @@ function addDetails(src, dst) {
* @param {object} dst
*/
function addLabel(src, dst) {
dst.label = outputGenerator(src);
dst.label = labelGenerator(src);
}
/**

2
helper/outputGenerator.js → helper/labelGenerator.js

@ -1,5 +1,5 @@
var schemas = require('./outputSchema.json');
var schemas = require('./labelSchema.json');
module.exports = function( record ){

0
helper/outputSchema.json → helper/labelSchema.json

2
test/unit/helper/outputSchema.js → test/unit/helper/labelSchema.js

@ -1,5 +1,5 @@
var schemas = require('../../../helper/outputSchema.json');
var schemas = require('../../../helper/labelSchema.json');
var alpha3 = require('../mock/alpha3.json');
module.exports.tests = {};

2
test/unit/run.js

@ -23,7 +23,7 @@ var tests = [
require('./query/defaults'),
require('./helper/query_parser'),
require('./helper/geojsonify'),
require('./helper/outputSchema'),
require('./helper/labelSchema'),
require('./helper/types'),
require('./helper/type_mapping'),
require('./sanitiser/_geo_common'),

Loading…
Cancel
Save