
Security News
Socket Releases Free Certified Patches for Critical vm2 Sandbox Escape
A critical vm2 sandbox escape can allow untrusted JavaScript to break isolation and execute commands on the host Node.js process.
cirru-script
Advanced tools
Live Docs: http://script.cirru.org/
Play with CirruScript by typing in here: http://repo.cirru.org/script/
The AST transformer of CirruScript is Scirpus https://github.com/Cirru/scirpus .
yarn add cirru-script
Here is a demo of calling compiler:
script = require 'cirru-script'
code = "console.log :demo"
script.compile code
By installing CirruScript at global, you'll get command cirruscript(and crs for short):
npm i -g cirru-script
cirruscript
# enter REPL
cirruscript>
cirruscript a.cirru
# evaluates a file
File compiling and SourceMaps support might come in the future.
Add DISPLAY_JS for displaying compiled js:
DISPLAY_JS=true cirruscript a.cirru
compile sub-command can compile code:
cirruscript compile from-dir to-dir
There are several command built into REPL for convenience.
Copying data as a string
console.copy :demo
Turn on DISPLAY_JS during REPL running:
console.DISPLAY_JS true
-- "test assignment"
= a 1
= b :string
= c true
= d undefined
= e /^hello\sworld$
-- "test values"
console.log 1
console.log a b c
array 1 2 3
console.log $ object (:a 1) (:b :)
:c $ array 1
-- "combine"
console.log $ array 1 2 3
= e $ array 1 2
= f $ object
:a 1
:c :nothing
... gulp
src :src/**/*.cirru (object (:base :src))
pipe $ script (object (:dest :../lib))
pipe $ rename (object (:extname :.js))
pipe $ gulp.dest :./lib
> 2 1
+ 1 2 3
and (> 2 1) true
not a
not (+ a 1)
new String :x :y
. a :b
? a
in a b
= list $ array 1 2 3 4 5
= obj $ object (:a 1) (:b 2)
= a 1
if (> a 1)
do
console.log true
console.log true
console.log true
do
console.log false
= b $ cond (> a 1) :>1 :<=1
console.log b
= f1 $ \ (a b)
= a $ + a 2
console.log a b
= f2 $ \ (a)
= a 1
, a
= f3 $ \ ((xs))
= head $ . xs 0
= body $ xs.slice 1
return body.length
switch a
1 :1
2
console.log 1
console.log 2
else a
switch 3
3 :3
else :else
switch true
(> a 1) :1
(> 2 3) :2
else
console.log 2
console.log 2
set a 4
switch true
(> a 2) :large
else :small
throw $ new Error ":just an error"
try
do
print x
error
console.error error
try
do
print y
err
MIT
FAQs
Generated JavaScript from Cirru Grammar
The npm package cirru-script receives a total of 174 weekly downloads. As such, cirru-script popularity was classified as not popular.
We found that cirru-script demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
A critical vm2 sandbox escape can allow untrusted JavaScript to break isolation and execute commands on the host Node.js process.

Research
Five malicious NuGet packages impersonate Chinese .NET libraries to deploy a stealer targeting browser credentials, crypto wallets, SSH keys, and local files.

Security News
pnpm 11 turns on a 1-day Minimum Release Age and blocks exotic subdeps by default, adding safeguards against fast-moving supply chain attacks.