From 2cba1a432fe5937204b8b27667725d2ec61e8ef8 Mon Sep 17 00:00:00 2001 From: rr- Date: Sat, 14 May 2016 13:12:01 +0200 Subject: [PATCH] client/general: replace underscore with lodash --- client/js/util/views.js | 6 +++--- client/package.json | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/client/js/util/views.js b/client/js/util/views.js index b4eb5733..38de1990 100644 --- a/client/js/util/views.js +++ b/client/js/util/views.js @@ -1,7 +1,7 @@ 'use strict'; require('../util/polyfill.js'); -const underscore = require('underscore'); +const lodash = require('lodash'); const tags = require('../tags.js'); const events = require('../events.js'); const domParser = new DOMParser(); @@ -240,12 +240,12 @@ function getTemplate(templatePath) { return null; } const templateText = templates[templatePath].trim(); - const templateFactory = underscore.template(templateText); + const templateFactory = lodash.template(templateText); return ctx => { if (!ctx) { ctx = {}; } - underscore.extend(ctx, { + lodash.extend(ctx, { makeRelativeTime: makeRelativeTime, makeThumbnail: makeThumbnail, makeRadio: makeRadio, diff --git a/client/package.json b/client/package.json index cc62f770..3f61d62f 100644 --- a/client/package.json +++ b/client/package.json @@ -17,14 +17,14 @@ "html-minifier": "^1.3.1", "js-cookie": "^2.1.0", "js-yaml": "^3.5.5", + "lodash": "^4.12.0", "merge": "^1.2.0", "mousetrap": "^1.5.3", "nprogress": "^0.2.0", "page": "^1.7.1", "stylus": "^0.54.2", "superagent": "^1.8.3", - "uglify-js": "git://github.com/mishoo/UglifyJS2.git#harmony", - "underscore": "^1.8.3" + "uglify-js": "git://github.com/mishoo/UglifyJS2.git#harmony" }, "devDependencies": { "watch": "latest"