jsc(1)

πŸ’– jsc β€” the command-line JavaScript interpreter, bestie πŸ’–

okay so you know how JavaScript is usually trapped inside a browser, doing browser things, being all webpage about it? yeah. jsc is the girl who said "not me, not today" and set JavaScript free to run wherever it wants. This is page 1 of the General Commands Manual, and it's about to be your new fav.


✨ NAME ✨

jsc β€” command-line JavaScript interpreter. literally what it says on the tin, no cap.


🌸 SYNOPSIS 🌸

jsc [options] [files] [-- arguments]

πŸ¦‹ DESCRIPTION πŸ¦‹

This manual page documents briefly the jsc command β€” like, the highlights, the sparknotes, the vibe check.

jsc is a command-line utility that lets you run JavaScript programs outside of the context of a web browser. No tabs, no DOM, no popups, just you and the code. It's primarily used as part of the test harness for validating the JavaScript portions of WebKit πŸ‘‘, but it can also be used as a scripting tool, which is the part where it becomes your bestie.

jsc can be run in an interactive mode so you can test out JavaScript expressions on the fly, OR you can pass it one or more files to run β€” similar to invoking a Perl or Python script. So it's giving REPL, it's giving script runner, it's giving versatility. obsessed.


πŸ’… OPTIONS πŸ’…

  • -e β€” Evaluate argument as script code. Just, like, hand it code directly, she'll run it.
  • -f β€” Specifies a source file (deprecated). ⚠️ Yeah, it's deprecated, so maybe don't build your whole personality around it.
  • -h, --help β€” Shows summary of command-line options. Your little cheat sheet. 🫢
  • -i β€” Enables interactive mode (this is the default if no files are specified). If you give her nothing, she'll just chat with you.
  • -p file β€” Outputs profiling data to a file. Receipts. πŸ“Š
  • -s β€” Installs signal handlers that exit on a crash. Safety net behaviour, we love her for it.
  • -x β€” Output exit code before terminating. So you always know how it went. πŸ’€ or ✨, no in-between.
  • --options β€” Dumps all JSC VM options and exits. Full info dump, then she's out.
  • --dumpOptions β€” Dumps all JSC VM options before continuing. Info dump, but she stays. 🌈
  • --<jsc VM option>=<value> β€” Sets the specified JSC VM option. You name it, you set it, iconic.

πŸ‘‘ AUTHOR πŸ‘‘

This manual page was written by Alberto Garcia <berto@igalia.com>, based on the contents of http://trac.webkit.org/wiki/JSC. Respect the author, fr fr. πŸŽ€


and that's the whole page, babe β€” this was page jsc(1), dated Jan 21, 2014, from the General Commands Manual. go forth and run some JavaScript outside a browser, you absolute main character. mwah. πŸ’–βœ¨πŸ¦‹