mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 04:29:21 +03:00
Array.isArray to isArray
Array.isNotEmpty to isNonEmptyArray
This commit is contained in:
parent
986b8f056b
commit
0b64083543
30 changed files with 82 additions and 69 deletions
1
dev/prototype.js
vendored
1
dev/prototype.js
vendored
|
|
@ -1,6 +1,5 @@
|
|||
|
||||
(doc=>{
|
||||
Array.isNotEmpty = array => Array.isArray(array) && array.length;
|
||||
Array.prototype.unique = function() { return this.filter((v, i, a) => a.indexOf(v) === i); };
|
||||
Array.prototype.validUnique = function(fn) {
|
||||
return this.filter((v, i, a) => (fn ? fn(v) : v) && a.indexOf(v) === i);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue