Browse Source

removed unused parameter

pull/680/head
Stephen Hess 8 years ago
parent
commit
34d9893018
  1. 6
      helper/geojsonify.js
  2. 2
      test/unit/helper/geojsonify.js

6
helper/geojsonify.js

@ -7,11 +7,11 @@ var _ = require('lodash');
var addDetails = require('./geojsonify_place_details'); var addDetails = require('./geojsonify_place_details');
var addMetaData = require('./geojsonify_meta_data'); var addMetaData = require('./geojsonify_meta_data');
function geojsonifyPlaces( params, docs, labelGenerator ){ function geojsonifyPlaces( params, docs ){
// flatten & expand data for geojson conversion // flatten & expand data for geojson conversion
var geodata = docs var geodata = docs
.map(geojsonifyPlace.bind(null, params, labelGenerator)) .map(geojsonifyPlace.bind(null, params))
.filter( function( doc ){ .filter( function( doc ){
return !!doc; return !!doc;
}); });
@ -34,7 +34,7 @@ function geojsonifyPlaces( params, docs, labelGenerator ){
return geojson; return geojson;
} }
function geojsonifyPlace(params, labelGenerator, place) { function geojsonifyPlace(params, place) {
// something went very wrong // something went very wrong
if( !place || !place.hasOwnProperty( 'center_point' ) ) { if( !place || !place.hasOwnProperty( 'center_point' ) ) {

2
test/unit/helper/geojsonify.js

@ -6,7 +6,7 @@ module.exports.tests = {};
module.exports.tests.interface = function(test, common) { module.exports.tests.interface = function(test, common) {
test('valid interface', function(t) { test('valid interface', function(t) {
t.equal(typeof geojsonify, 'function', 'geojsonify is a function'); t.equal(typeof geojsonify, 'function', 'geojsonify is a function');
t.equal(geojsonify.length, 3, 'accepts x arguments'); t.equal(geojsonify.length, 2, 'accepts x arguments');
t.end(); t.end();
}); });
}; };

Loading…
Cancel
Save