Refactor utils and organize routes/schema
This commit is contained in:
9
utils/array.js
Normal file
9
utils/array.js
Normal file
@@ -0,0 +1,9 @@
|
||||
// removeValue(array, item) remove item from the array
|
||||
function removeValue(array, item) {
|
||||
var index = array.indexOf(item);
|
||||
if (index !== -1) {
|
||||
array.splice(index, 1);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports.removeValue = removeValue;
|
||||
Reference in New Issue
Block a user