Skip to content
This repository has been archived by the owner on Jan 13, 2018. It is now read-only.

Use lodash instead of underscore #94

Closed
arikon opened this issue Apr 26, 2012 · 11 comments
Closed

Use lodash instead of underscore #94

arikon opened this issue Apr 26, 2012 · 11 comments

Comments

@arikon
Copy link
Contributor

arikon commented Apr 26, 2012

We can use lodash instead of underscore because it is 8x faster

https://github.com/bestiejs/lodash

@qfox
Copy link

qfox commented Oct 18, 2013

_ usage at the moment:

[release-1.0.0] bem-tools $ grep -P '[\s\b]_\.\w' ./ -r --exclude=jquery* --exclude-dir=node_modules --exclude-dir=bem-bl | sed -r -e 's/.*\s_\.(\w+).*/\1/' | sort | uniq
all
contains
defaults
difference
sortBy
union
uniq

$ grep -P '[\s\b]_\.\w' ./ -r --exclude=jquery* --exclude-dir=node_modules --exclude-dir=bem-bl
./test/bem-make.js:                _.union(files, dirFiles).length === files.length;
./lib/util.js:    opts = _.defaults(opts || {}, {
./lib/util.js:    return _.all(needles, function(i) {
./lib/util.js:        return _.contains(arr, i);
./lib/tech/v2.js:            this._suffixes = _.uniq(res);
./lib/nodes/build.js:                    _.difference(filteredPaths, savedPaths));
./lib/nodes/build.js:            var obsolete = _.difference(savedPaths, filteredPaths);
./lib/nodes/level.js:        return _.uniq(
./lib/nodes/level.js:            _.sortBy(
./lib/nodes/level.js:        var r = _.uniq(
./lib/nodes/level.js:            _.sortBy(

$ grep -P "require\(.underscore.\)" -r --exclude=jquery* --exclude-dir=node_modules --exclude-dir=bem-bl
test/bem-make.js:    _ = require('underscore'),
lib/util.js:    _ = require('underscore');
lib/tech/v2.js:    _ = require('underscore'),
lib/nodes/build.js:var _ = require('underscore'),
lib/nodes/level.js:    _ = require('underscore'),

It's easily can be replaced ATM.

@arikon
Copy link
Contributor Author

arikon commented Oct 20, 2013

@zxqfox We already replaced underscore with lodash in release-1.0.0

@qfox
Copy link

qfox commented Oct 21, 2013

@arikon Please can you push your changes to release-1.0.0? I still see underscore in code. ;-(

@arikon
Copy link
Contributor Author

arikon commented Oct 21, 2013

@zxqfox Hm, we need to check!
@SevInf I remember you merged this change, didn't you?

@SevInf
Copy link
Contributor

SevInf commented Oct 21, 2013

@arikon, no it wasn't me. Both 1.0.0 and 0.6.x are still using underscore.

@arikon
Copy link
Contributor Author

arikon commented Oct 21, 2013

Shame on me

21.10.2013, 16:54, "Sergej Tatarincev" [email protected]:

@arikon, no it wasn't me. Both 1.0.0 and 0.6.x are still using underscore.


Reply to this email directly or view it on GitHub.

Отправлено из мобильной Яндекс.Почты: http://m.ya.ru/ymail

@arikon
Copy link
Contributor Author

arikon commented Oct 23, 2013

@zxqfox Could you make a PR for the release-1.0.0 branch?

@qfox
Copy link

qfox commented Oct 23, 2013

@arikon Sure. Added to my todo list.

@qfox
Copy link

qfox commented Oct 26, 2013

@arikon @SevInf Guys. It's trivial migration. Tests passed. Tell me if we need to fix something else.

SevInf pushed a commit that referenced this issue Nov 7, 2013
Conflicts:
	lib/util.js
	test/bem-make.js
SevInf pushed a commit that referenced this issue Nov 7, 2013
@qfox
Copy link

qfox commented Nov 11, 2013

@SevInf Issuer resolved for 0.7 & 1.0.

@SevInf
Copy link
Contributor

SevInf commented Nov 11, 2013

@zxqfox, thanks, closing this.

@SevInf SevInf closed this as completed Nov 11, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants