mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 06:27:49 +00:00
Fix style nits.
This commit is contained in:
1
.jscsrc
1
.jscsrc
@@ -77,7 +77,6 @@
|
||||
"disallowKeywords": ["with"],
|
||||
"disallowMixedSpacesAndTabs": true,
|
||||
"disallowMultipleLineBreaks": true,
|
||||
"disallowMultipleLineStrings": true,
|
||||
"disallowNewlineBeforeBlockStatements": true,
|
||||
"disallowSpaceAfterObjectKeys": true,
|
||||
"disallowSpaceAfterPrefixUnaryOperators": true,
|
||||
|
||||
@@ -99,7 +99,7 @@ function build(target) {
|
||||
var actions = modulePaths.map(function(modulePath) {
|
||||
var moduleName = path.basename(modulePath, '.js');
|
||||
return _.partial(fs.writeFile, path.join(fpPath, moduleName + '.js'), getTemplate(moduleName));
|
||||
})
|
||||
});
|
||||
|
||||
actions.unshift(_.partial(fs.copy, path.join(__dirname, '../../fp'), fpPath));
|
||||
actions.push(_.partial(fs.writeFile, path.join(target, 'fp.js'), template.fp()));
|
||||
|
||||
18
test/test.js
18
test/test.js
@@ -543,11 +543,11 @@
|
||||
' };',
|
||||
'',
|
||||
" ['" + typedArrays.join("', '") + "'].forEach(function(type) {",
|
||||
" var Ctor = root[type]",
|
||||
' var Ctor = root[type]',
|
||||
' if (Ctor) {',
|
||||
" object[type.toLowerCase()] = new Ctor(new ArrayBuffer(24));",
|
||||
' object[type.toLowerCase()] = new Ctor(new ArrayBuffer(24));',
|
||||
' }',
|
||||
" });",
|
||||
' });',
|
||||
'',
|
||||
' return object;',
|
||||
'}())'
|
||||
@@ -593,7 +593,7 @@
|
||||
"_.each(['" + typedArrays.join("', '") + "'], function(type) {",
|
||||
' var Ctor = root[type];',
|
||||
' if (Ctor) {',
|
||||
" object[type.toLowerCase()] = new Ctor(new ArrayBuffer(24));",
|
||||
' object[type.toLowerCase()] = new Ctor(new ArrayBuffer(24));',
|
||||
' }',
|
||||
'});',
|
||||
'',
|
||||
@@ -2367,7 +2367,7 @@
|
||||
'undefined values': undefined
|
||||
};
|
||||
|
||||
objects['arrays'].length = 3;
|
||||
objects.arrays.length = 3;
|
||||
|
||||
var uncloneable = {
|
||||
'DOM elements': body,
|
||||
@@ -2642,7 +2642,9 @@
|
||||
var props = [];
|
||||
|
||||
var objects = lodashStable.transform(_, function(result, value, key) {
|
||||
if (lodashStable.startsWith(key, '_') && lodashStable.isObject(value) && !lodashStable.isArguments(value) && !lodashStable.isElement(value) && !lodashStable.isFunction(value)) {
|
||||
if (lodashStable.startsWith(key, '_') && lodashStable.isObject(value) &&
|
||||
!lodashStable.isArguments(value) && !lodashStable.isElement(value) &&
|
||||
!lodashStable.isFunction(value)) {
|
||||
props.push(lodashStable.capitalize(lodashStable.camelCase(key)));
|
||||
result.push(value);
|
||||
}
|
||||
@@ -2664,7 +2666,7 @@
|
||||
assert.expect(2);
|
||||
|
||||
if (!isNpm) {
|
||||
var object = objects['objects'],
|
||||
var object = objects.objects,
|
||||
actual = _(object)[methodName]();
|
||||
|
||||
assert.deepEqual(actual, object);
|
||||
@@ -21747,7 +21749,7 @@
|
||||
|
||||
lodashStable.each(['uniq', 'uniqBy', 'uniqWith', 'sortedUniq', 'sortedUniqBy'], function(methodName) {
|
||||
var func = _[methodName],
|
||||
isSorted = /^sorted/.test(methodName);
|
||||
isSorted = /^sorted/.test(methodName),
|
||||
objects = [{ 'a': 2 }, { 'a': 3 }, { 'a': 1 }, { 'a': 2 }, { 'a': 3 }, { 'a': 1 }];
|
||||
|
||||
if (isSorted) {
|
||||
|
||||
Reference in New Issue
Block a user