Sha256: 8110a5dddbc1042c679d4553c882c8e048fbe7e641124f7e587669e104e81dc3
Contents?: true
Size: 513 Bytes
Versions: 6
Compression:
Stored size: 513 Bytes
Contents
split = (sep, str) --> str.split sep join = (sep, xs) --> xs.join sep lines = (str) -> return [] unless str.length str.split '\n' unlines = (.join '\n') words = (str) -> return [] unless str.length str.split /[ ]+/ unwords = (.join ' ') chars = (.split '') unchars = (.join '') reverse = (str) -> str.split '' .reverse!.join '' repeat = (n, str) --> out = [str for til n] out.join '' module.exports = { split, join, lines, unlines, words, unwords, chars, unchars, reverse, repeat, }
Version data entries
6 entries across 6 versions & 2 rubygems