8000 Removed dependency on lodash.map by zashraf1985 · Pull Request #409 · optimizely/javascript-sdk · GitHub
[go: up one dir, main page]

Skip to content

Removed dependency on lodash.map #409

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account relate 8000 d emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions packages/optimizely-sdk/lib/plugins/event_dispatcher/index.browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
var fns = require('../../utils/fns');

var POST_METHOD = 'POST';
var GET_METHOD = 'GET';
var READYSTATE_COMPLETE = 4;
Expand Down Expand Up @@ -68,7 +66,7 @@ module.exports = {
};

var toQueryString = function(obj) {
return fns.map(obj, function(v, k) {
return encodeURIComponent(k) + '=' + encodeURIComponent(v);
return Object.keys(obj).map(function(k) {
return encodeURIComponent(k) + '=' + encodeURIComponent(obj[k]);
}).join('&');
};
1 change: 0 additions & 1 deletion packages/optimizely-sdk/lib/utils/fns/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ module.exports = {
keyBy: require('lodash/keyBy'),
forEach: require('lodash/forEach'),
forOwn: require('lodash/forOwn'),
map: require('lodash/map'),
uuid: function() {
return uuid.v4();
},
Expand Down
0