From aaa2b964fac039e363e1163e66175be11238f90b Mon Sep 17 00:00:00 2001 From: Abe Petrillo Date: Tue, 23 Feb 2016 16:54:58 -0500 Subject: [PATCH] remove lodash dependency --- index.js | 3 +-- package.json | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index 5458b65..1f631ff 100644 --- a/index.js +++ b/index.js @@ -14,7 +14,6 @@ var http = require('http'), port = process.env.PORT || 8080, allowedOriginalHeaders = new RegExp('^' + require('./allowedOriginalHeaders.json').join('|'), 'i'), allowedRequestHeaders = require('./allowedRequestHeaders.json'), - _ = require('lodash'), bannedUrls = new RegExp(require('./bannedUrls.json').join('|'), 'i'), defaultOptions = { gzip:true @@ -85,7 +84,7 @@ var http = require('http'), return str.toLowerCase(); } //add headers from original request - for ( var header of _.map(allowedRequestHeaders, toLower)) { + for ( var header of allowedRequestHeaders.map(toLower)) { opts.headers[header] = req.headers[header] } return opts diff --git a/package.json b/package.json index aaeb153..67afca0 100644 --- a/package.json +++ b/package.json @@ -8,8 +8,7 @@ }, "license": "MIT", "dependencies": { - "request": "^2.40.0", - "lodash": "latest" + "request": "^2.40.0" }, "keywords": [ "cors",