### compact
从数组中移除 falsey 值。
使用`Array.filter()`筛选出 falsey 值 (`false`、`null`、`0`、`""`、`undefined`和`NaN`).
~~~js
const compact = (arr) => arr.filter(Boolean);
// compact([0, 1, false, 2, '', 3, 'a', 'e'*23, NaN, 's', 34]) -> [ 1, 2, 3, 'a', 's', 34 ]
~~~
- 数组类
- arrayMax
- arrayMin
- chunk
- compact
- countOccurrences
- deepFlatten
- difference
- distinctValuesOfArray
- dropElements
- everyNth
- filterNonUnique
- flatten
- flattenDepth
- groupby
- head
- initial
- initializeArrayWithRange
- initializeArrayWithValues
- intersection
- last
- mapObject
- nthElement
- pick
- pull
- remove
- sample
- shuffle
- similarity
- symmetricDifference
- tail
- take
- takeRight
- union
- without
- zip
- 浏览器
- bottomVisible
- currentURL
- elementIsVisibleInViewport
- getScrollPosition
- getURLParameters
- redirect
- scrollToTop
- 日期
- getDaysDiffBetweenDates
- JSONToDate
- toEnglishDate
- 函数类
- chainAsync
- compose
- curry
- functionName
- pipe
- promisify
- runPromisesInSeries
- sleep
- 数学
- arrayAverage
- arraySum
- collatz
- digitize
- distance
- factorial
- fibonacci
- gcd
- hammingDistance
- isDivisible
- iseven
- lcm
- median
- palindrome
- percentile
- powerset
- randomIntegerInRange
- randomNumberInRange
- round
- standardDeviation
- 媒体
- speechSynthesis
- 节点
- JSONToFile
- readFileLines
- 对象
- cleanObj
- objectFromPairs
- objectToPairs
- shallowClone
- truthCheckCollection
- 字符串
- anagrams
- Capitalize
- capitalizeEveryWord
- escapeRegExp
- fromCamelCase
- reverseString
- sortCharactersInString
- toCamelCase
- truncateString
- 实用
- coalesce
- coalesceFactory
- extendHex
- gettype
- hexToRGB
- isArray
- isBoolean
- isFunction
- isNumber
- isString
- isSymbol
- RGBToHex
- timeTaken
- toOrdinalSuffix
- UUIDGenerator
- validateEmail
- validateNumber
- copy
- clone
- throttle
- Shake
- isSupportTouch