chore(): rename website/src -> website/server and website/public -> website/client (#7199)

This commit is contained in:
Matteo Pagliazzi
2016-05-13 15:35:12 +02:00
parent 486b93a3c9
commit 199732539f
504 changed files with 202 additions and 202 deletions

View File

@@ -0,0 +1,22 @@
import {
findIndex,
isPlainObject,
} from 'lodash';
export function removeFromArray (array, element) {
let elementIndex;
if (isPlainObject(element)) {
elementIndex = findIndex(array, element);
} else {
elementIndex = array.indexOf(element);
}
if (elementIndex !== -1) {
let removedElement = array[elementIndex];
array.splice(elementIndex, 1);
return removedElement;
}
return false;
}