Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
function baseDifference(array, values, iteratee, comparator) { let index = -1; let length = array.length; let result = []; let includes = arrayIncludes; let isCommon = true; if (!length) { return result; } if (iteratee) { values = values.map(iteratee); } if (comparator) { includes = arrayIncludesWith; isCommon = false; } else if (values.length >= 200) { includes = cacheHas; isCommon = false; values = new SetCache(values); } outer: while (++index < length) { let value = array[index]; let computed = iteratee == null ? value : iteratee(value); if (isCommon && computed === computed) { let valuesIndex = values.length; while (valuesIndex--) { if (values[valuesIndex] === computed) { continue outer; } } result.push(value); } else if (!includes(values, computed, comparator)) { result.push(value); } } return result; }
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)