Skip to content

mattneary/skua

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

skua

skua

A text processing language in the order of awk

$ npm install -g cdrepo 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

About

Text processing in the order of awk

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published