CoffeeScript comes with a few helper functions. How to use them? flatten(Array)
for example.
These functions seem to be intended for private use by the CoffeeScript compiler. It might be better to use a general-purpose library like Underscore.js if you want these sort of features.
coffee> _ = require('underscore')
coffee> _.flatten [1, 2, 3, [4, 5]]
[ 1, 2, 3, 4, 5 ]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With