New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

elm-line

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

elm-line

Running Elm from the command line

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

elm-line

A simple wrapper for Elm that takes Elm scripts and runs them as a command line program.

Want this program in your path? npm link!

Example Usage

$ cat square.ielm
main = Interact.onInts (\x -> x * x)

$ elm-line square.ielm
> 15
225
> 532
283024
> ^C

$ cat tac.ielm
-- a simple program which reverses each line
-- !woem --
main = Interact.onLines String.reverse

$ elm-line tac.ielm <tac.ielm
enil hcae sesrever hcihw margorp elpmis a --
-- meow! --
esrever.gnirtS seniLno.tcaretnI = niam

$ cat paren-words.ielm
onWords : (String -> String) -> Interact.Interactor
onWords fn =
  Interact.onLines (String.split " " >> List.map fn >> String.join " ")
main = onWords (\word -> "(" ++ word ++ ")")

$ elm-line paren-words.ielm
> hello there
(hello) (there)
> what is a word
(what) (is) (a) (word)
> ^C

Keywords

FAQs

Package last updated on 28 Feb 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc