Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/AdFabConnect/abejs into r…
…eference-editor # Conflicts: # src/cli/core/manager/Manager.js
- Loading branch information
Showing
18 changed files
with
260 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/** | ||
* Highly efficient filter on a value in an object | ||
* @param {Array} arr the array of objects | ||
* @param {string} key the key to filter on | ||
* @param {mixed} value the value to compare | ||
* @return {Array} the filtered array | ||
*/ | ||
export function filter(arr, key, value) { | ||
var result = [] | ||
var i = 0 | ||
var len = arr.length | ||
|
||
for (; i < len; i += 1) { | ||
var elt = arr[i] | ||
|
||
if (elt[key] == value) { | ||
result.push(element) | ||
} | ||
} | ||
return result | ||
} | ||
|
||
/** | ||
* Highly efficient find indexes on a value in an property of an object | ||
* @param {Array} arr the array of objects | ||
* @param {string} key the key to filter on | ||
* @param {mixed} value the value to compare | ||
* @return {Array} the filtered array of indexes | ||
*/ | ||
export function find(arr, key, value) { | ||
var result = [] | ||
var i = 0 | ||
var len = arr.length | ||
|
||
for (; i < len; i += 1) { | ||
var elt = arr[i] | ||
|
||
if (elt[key] == value) { | ||
result.push(i) | ||
} | ||
} | ||
return result | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
import * as array from './array' | ||
import * as sort from './sort' | ||
import * as text from './text' | ||
import locales from './locales' | ||
import * as slug from './slug' | ||
import * as file from './file' | ||
|
||
export { | ||
sort | ||
,text | ||
,locales | ||
,slug | ||
,file | ||
array, | ||
sort, | ||
text, | ||
locales, | ||
slug, | ||
file | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.