skua-cli

0.2.0 • Public • Published

skua

skua

A text processing language in the order of awk

$ npm install -g skua-cli

usage

The following is an implementation of McIlroy's famed one-liner in skua.

$ cat README.md | skua "(flatMap (split /[^A-Za-z]/))
                        (filter (compose not (test /^$/)))
                        (map toLower)
                        (toArray)
                        (map (countBy identity))
                        (map (fanout (zipWith (sandwich \" \")) values keys))
                        (flatMap (sort naturalSort))
                        (take 4)"
 
6 skua
4 sh
3 cat
3 flatmap
$ cat README.md | skua "(filter (test /usage/))"
# usage 
$ cat package.json | skua "(squash)
                           (flatMap (pipe parse (prop \"dependencies\") keys))"
ramda
rx
rx-node

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.2.0
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.2.0
    1
  • 0.1.1
    0
  • 0.1.0
    0

Package Sidebar

Install

npm i skua-cli

Weekly Downloads

0

Version

0.2.0

License

none

Last publish

Collaborators

  • mattneary