section: Language, related to: Array * $w(String) -> Array * * Splits a string into an [[Array]], treating all whitespace as delimiters. Equivalent * to Ruby's `%w{foo bar}` or Perl's `qw(foo bar)`. * * This is one of those life-savers for people who just hate commas in literal arrays :-)
(string)
| 93 | **/ |
| 94 | |
| 95 | function $w(string) { |
| 96 | if (!Object.isString(string)) return []; |
| 97 | string = string.strip(); |
| 98 | return string ? string.split(/\s+/) : []; |
| 99 | } |
| 100 | |
| 101 | /** alias of: $A |
| 102 | * Array.from(iterable) -> Array |
no outgoing calls
no test coverage detected