From 18033535c1480d3a70b48e87f353902e16303247 Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Mon, 14 Sep 2015 19:36:53 +0200 Subject: [PATCH] delete deprecated --- sanitiser/_layers.js | 46 -------------------------------------------- 1 file changed, 46 deletions(-) delete mode 100644 sanitiser/_layers.js diff --git a/sanitiser/_layers.js b/sanitiser/_layers.js deleted file mode 100644 index b7922557..00000000 --- a/sanitiser/_layers.js +++ /dev/null @@ -1,46 +0,0 @@ - -var check = require('check-types'), - types = require('../query/types'), - get_layers = require('../helper/layers'); - -// decide which layers can be queried -var ALIAS_LAYERS = ['poi', 'admin', 'address'], - ALIAS_TYPES = types.concat(ALIAS_LAYERS), - ALIAS_TYPES_JOINED = ALIAS_TYPES.join(','); - -// validate inputs, convert types and apply defaults -function sanitize( raw, clean ){ - - // error & warning messages - var messages = { errors: [], warnings: [] }; - - // init clean.types - clean.types = clean.types || {}; - - // default case (no layers specified in GET params) - // don't even set the from_layers key in this case - if( check.unemptyString( raw.layers ) ){ - - // parse GET params - var layers = raw.layers.split(',').map( function( layer ){ - return layer.toLowerCase(); // lowercase inputs - }); - - // validate layer names - for( var x=0; x