Add picture wall filtering and bump nuxt
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
* Returns a filter lambda to be used in array.filter() to only allow the
|
||||
* first occurrence of duplicate values.
|
||||
* @param isEqual Custom equality check, defaults to `a === b`
|
||||
*/
|
||||
export function unique<E>(
|
||||
isEqual: (a: E, b: E) => boolean = (a, b) => a === b
|
||||
) {
|
||||
return (self: E, index: number, arr: ReadonlyArray<E>) =>
|
||||
arr.findIndex((v) => isEqual(v, self)) === index;
|
||||
}
|
||||
Reference in New Issue
Block a user