Crystal Lang embedded Javascript interpreter using MuJS.
require "mujs"
js = Mujs.new
js.defn("print", 1) do |args|
puts args[0].as(String)
end
js.dostring(%[print("hello world")])
more examples at spec/mujs_spec.cr
.
-
Add the dependency to your
shard.yml
:dependencies: mujs: github: bit4bit/mujs.cr
-
Run
shards install
see spec/mujs_spec.cr
- Fork it (https://github.com/bit4bit/mujs.cr/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
- Jovany Leandro G.C - creator and maintainer