-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# quickjs.rb | ||
|
||
A Ruby wrapper for [QuickJS](https://bellard.org/quickjs) to run JavaScript codes via Ruby with a smaller footprint. | ||
|
||
## Installation | ||
|
||
``` | ||
gem install quickjs | ||
``` | ||
|
||
``` | ||
gem 'quickjs' | ||
``` | ||
|
||
## Features | ||
|
||
### Evaluate JavaScript code | ||
|
||
```rb | ||
require 'quickjs' | ||
|
||
Quickjs.evalCode('const fn = (n, pow) => n ** pow; fn(2,8);') # => 256 | ||
``` | ||
|
||
## License | ||
|
||
Every file in `ext/quickjsrb/quickjs` is licensed under [the MIT License Copyright 2017-2021 by Fabrice Bellard and Charlie Goron](/ext/quickjsrb/quickjs/LICENSE). For otherwise, [the MIT License, Copyright 2024 by Kengo Hamasaki](/LICENSE). |