mirror of https://github.com/pelias/api.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
6 lines
269 B
6 lines
269 B
8 years ago
|
const _ = require('lodash');
|
||
|
|
||
|
// return IFF req.clean.layers is empty OR there are non-venue/address/street layers
|
||
|
module.exports = (req, res) => !_.isEmpty(_.get(req, 'clean.layers', [])) &&
|
||
|
_.isEmpty(_.difference(req.clean.layers, ['venue', 'address', 'street']));
|