Skip to content

Commit

Permalink
- indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
bwbuser authored and bwbuser committed Jul 13, 2017
1 parent 889db6f commit ed02340
Show file tree
Hide file tree
Showing 6 changed files with 190 additions and 190 deletions.
2 changes: 1 addition & 1 deletion src/extensions/date.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default {
* @return {timestamp|0}
*/
toTimestamp(d) {
if(!Date.isDate(d)) {
if (!Date.isDate(d)) {
return 0;
}

Expand Down
2 changes: 1 addition & 1 deletion src/extensions/function.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export default {
proxy(scope, ...proxyArgs) {
const func = this;

return function(...args) {
return function (...args) {
return func.apply(scope, (proxyArgs.length >= 1 ? proxyArgs : args));
};
},
Expand Down
228 changes: 114 additions & 114 deletions src/extensions/lodash.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@ export default {
* filters a collection with a list of values specified for one property<br><br>
* @example <caption>eg. usage</caption>
* var collection = [{
* id: 1, status: 'active'
* }, {
* id: 2, status: 'disabled'
* }, {
* id: 3, status: 'unactive'
* }];
* id: 1, status: 'active'
* }, {
* id: 2, status: 'disabled'
* }, {
* id: 3, status: 'unactive'
* }];
*
* var allowedValues = ['active', 'unactive'];
*
Expand All @@ -85,36 +85,36 @@ export default {
* deeply maps a recursive tree structure with (same structure) childrenPropName or 'children' property<br><br>
* @example <caption>eg. usage</caption>
* var tree = [{
* id: '1', status: 'enabled', items: [{
* id: '1.1', status: 'enabled', items: [{
* id: '1.1.1', status: 'enabled'
* }, {
* id: '1.1.2', status: 'disabled'
* }]
* }, {
* id: '1.2', status: 'disabled'
* }]
* }];
* id: '1', status: 'enabled', items: [{
* id: '1.1', status: 'enabled', items: [{
* id: '1.1.1', status: 'enabled'
* }, {
* id: '1.1.2', status: 'disabled'
* }]
* }, {
* id: '1.2', status: 'disabled'
* }]
* }];
*
* console.log(_.deepMap(tree, 'items', function(treeItem) {
* return {
* id: treeItem.id,
* status: treeItem.status,
* combo: treeItem.id + '-' + treeItem.status
* };
* });
* return {
* id: treeItem.id,
* status: treeItem.status,
* combo: treeItem.id + '-' + treeItem.status
* };
* });
*
* // logs [{
* id: '1', status: 'enabled', combo: '1-enabled' items: [{
* id: '1.1', status: 'enabled', combo: '1.1-enabled', items: [{
* id: '1.1.1', status: 'enabled', combo: '1.1.1-enabled'
* }, {
* id: '1.1.2', status: 'disabled', combo: '1.1.2-disabled'
* }]
* }, {
* id: '1.2', status: 'disabled', combo: '1.2-disabled'
* }]
* }]
* id: '1', status: 'enabled', combo: '1-enabled' items: [{
* id: '1.1', status: 'enabled', combo: '1.1-enabled', items: [{
* id: '1.1.1', status: 'enabled', combo: '1.1.1-enabled'
* }, {
* id: '1.1.2', status: 'disabled', combo: '1.1.2-disabled'
* }]
* }, {
* id: '1.2', status: 'disabled', combo: '1.2-disabled'
* }]
* }]
* @memberOf lodash
* @method deepMap
* @instance
Expand All @@ -139,42 +139,42 @@ export default {
* looking for an item with the propName === propValue<br><br>
* @example <caption>eg. usage</caption>
* var tree = [{
* id: '1', status: 'enabled', items: [{
* id: '1.1', status: 'enabled', items: [{
* id: '1.1.1', status: 'enabled'
* }, {
* id: '1.1.2', status: 'disabled'
* }]
* }, {
* id: '1.2', status: 'disabled'
* }]
* }, {
* id: '2', status: 'disabled', items: [{
* id: '2.1', status: 'enabled'
* }, {
* id: '2.2', status: 'enabled'
* }]
* }, {
* id: '3', status: 'enabled', items: [{
* id: '3.1', status: 'disabled'
* }, {
* id: '3.2', status: 'enabled'
* }, {
* id: '3.3', status: 'enabled'
* }]
* }];
* id: '1', status: 'enabled', items: [{
* id: '1.1', status: 'enabled', items: [{
* id: '1.1.1', status: 'enabled'
* }, {
* id: '1.1.2', status: 'disabled'
* }]
* }, {
* id: '1.2', status: 'disabled'
* }]
* }, {
* id: '2', status: 'disabled', items: [{
* id: '2.1', status: 'enabled'
* }, {
* id: '2.2', status: 'enabled'
* }]
* }, {
* id: '3', status: 'enabled', items: [{
* id: '3.1', status: 'disabled'
* }, {
* id: '3.2', status: 'enabled'
* }, {
* id: '3.3', status: 'enabled'
* }]
* }];
*
* console.log(_.deepFindBy(tree, 'id', '1.1.1', 'items');
* // logs {
* id: '1.1.1', status: 'enabled'
* }
* id: '1.1.1', status: 'enabled'
* }
*
* console.log(_.deepFindBy(tree, function(item) {
* return item.id === '3.2'
* }, null, 'items');
* return item.id === '3.2'
* }, null, 'items');
* // logs {
* id: '3.2', status: 'enabled'
* }
* id: '3.2', status: 'enabled'
* }
* @memberOf lodash
* @method deepFindBy
* @instance
Expand Down Expand Up @@ -211,57 +211,57 @@ export default {
* deeply sorts a recursive tree structure with (same structure) childrenPropName or 'children' property<br><br>
* @example <caption>eg. usage</caption>
* var tree = [{
* id: '1', status: 'enabled', items: [{
* id: '1.1', status: 'enabled', items: [{
* id: '1.1.1', status: 'enabled'
* }, {
* id: '1.1.2', status: 'disabled'
* }]
* }, {
* id: '1.2', status: 'disabled'
* }]
* }, {
* id: '2', status: 'disabled', items: [{
* id: '2.1', status: 'enabled'
* }, {
* id: '2.2', status: 'enabled'
* }]
* }, {
* id: '3', status: 'enabled', items: [{
* id: '3.1', status: 'disabled'
* }, {
* id: '3.2', status: 'enabled'
* }, {
* id: '3.3', status: 'enabled'
* }]
* }];
* id: '1', status: 'enabled', items: [{
* id: '1.1', status: 'enabled', items: [{
* id: '1.1.1', status: 'enabled'
* }, {
* id: '1.1.2', status: 'disabled'
* }]
* }, {
* id: '1.2', status: 'disabled'
* }]
* }, {
* id: '2', status: 'disabled', items: [{
* id: '2.1', status: 'enabled'
* }, {
* id: '2.2', status: 'enabled'
* }]
* }, {
* id: '3', status: 'enabled', items: [{
* id: '3.1', status: 'disabled'
* }, {
* id: '3.2', status: 'enabled'
* }, {
* id: '3.3', status: 'enabled'
* }]
* }];
*
* console.log(_.deepOrderBy(tree, ['id'], ['desc'], 'items');
* // logs [{
* id: '3', status: 'enabled', items: [{
* id: '3.3', status: 'enabled'
* }, {
* id: '3.2', status: 'disabled'
* }, {
* id: '3.1', status: 'enabled'
* }]
* }, {
* id: '2', status: 'disabled', items: [{
* id: '2.2', status: 'enabled'
* }, {
* id: '2.1', status: 'enabled'
* }]
* }, {
* id: '1', status: 'enabled', items: [{
* id: '1.2', status: 'disabled'
* }, {
* id: '1.1', status: 'enabled', items: [{
* id: '1.1.2', status: 'enabled'
* }, {
* id: '1.1.1', status: 'disabled'
* }]
* }]
* }]
* id: '3', status: 'enabled', items: [{
* id: '3.3', status: 'enabled'
* }, {
* id: '3.2', status: 'disabled'
* }, {
* id: '3.1', status: 'enabled'
* }]
* }, {
* id: '2', status: 'disabled', items: [{
* id: '2.2', status: 'enabled'
* }, {
* id: '2.1', status: 'enabled'
* }]
* }, {
* id: '1', status: 'enabled', items: [{
* id: '1.2', status: 'disabled'
* }, {
* id: '1.1', status: 'enabled', items: [{
* id: '1.1.2', status: 'enabled'
* }, {
* id: '1.1.1', status: 'disabled'
* }]
* }]
* }]
* @memberOf lodash
* @method deepOrderBy
* @instance
Expand Down Expand Up @@ -320,8 +320,8 @@ export default {
* a reverse implementation of _.times by lodash<br><br>
* @example <caption>eg. usage</caption>
* _.timesReverse(5, function(i) {
* console.log(i);
* });
* console.log(i);
* });
*
* // logs
* 5
Expand Down Expand Up @@ -364,8 +364,8 @@ export default {
* 10
* @example <caption>or</caption>
* _.timesRange(5, 10, function(i) {
* console.log(i);
* }, true);
* console.log(i);
* }, true);
*
* // logs
* 10
Expand Down
4 changes: 2 additions & 2 deletions src/extensions/number.js
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ export default {
if (diff < min) {
diff += max;
}

if (diff > max / 2) {
diff = max - diff;
}
Expand All @@ -536,7 +536,7 @@ export default {
}

const diff = Number.degreeDiff(ang1, ang2, min, max);

if (diff > max / 2) {
return -1;
}
Expand Down
Loading

0 comments on commit ed02340

Please sign in to comment.