[概要(Abstract)] [仕様(Specification)] [ライセンス(License)] [ダウンロード(Download)]
Siphone Coffee Makerは、Javaランタイム上で動くCoffeeScriptコンパイラです。
Siphone Coffee Maker is a compiler that runs on Java Runtime CoffeeScript.
| OS | Java 6 SE以上のランタイムが動作するOS OS operating over a runtime of Java 6 SE |
|---|---|
| Java | Java 6 SEに準拠したランタイム環境 Java 6 SE compatibled runtime |
Usage: scoffee [options] [args]
where [options] include:
-c, --compile compile to JavaScript and save as .js files
-i, --interactive run an interactive CoffeeScript REPL
-o, --output [DIR] set the directory for compiled JavaScript
-p, --print print the compiled JavaScript to stdout
-s, --stdio listen for and compile scripts over stdio
-e, --eval compile a string from the command line
-b, --bare compile without the top-level function wrapper
-v, --version display CoffeeScript version
-h, --help display this help message
| 関数・定数 | 内容 | 例 |
|---|---|---|
| importPackage | Javaパッケージのインポート | importPackage(java.io) |
| Packages | Javaクラスの取得 | System = Packages.java.lang.System |
| 関数・定数 | 内容 | 例 |
|---|---|---|
| eval | JavaScriptコードの評価 | message = eval("message = 'Hello' + ', ' + 'world!';") |
| parseInt | 文字列を整数値に変換 | number = parseInt '123.456' |
| parseFloat | 文字列を浮動小数点数地に変換 | number = parseFloat '123.456' |
| isNaN | 非数であるかどうかテスト | number = NaN println if isNaN(number) then "NaN" else "Number" |
| escape | 文字列をエスケープ | encodedStr = escape 'This is a pen.' |
| unescape | エスケープされた文字列を戻す | unescapedStr = unescape 'This%20is%20a%20pen.' |
| encodeURI | 文字列をURLエンコード形式にエンコード(予約文字を含まない) | encodedStr = encodeURI 'http://foo/~abc/ hello, world!' |
| decodeURI | 文字列をURLエンコード形式にデコード(予約文字を含まない) | decodedStr = decodeURI ' http://foo/~abc/%20hello,%20world!' |
| encodeURIComponent | 文字列をURLエンコード形式にエンコード(予約文字を含む) | encodedStr = encodeURIComponent 'http://foo/~abc/ hello, world!' |
| decodeURIComponent | 文字列をURLエンコード形式にデコード(予約文字を含む) | decodedStr = decodeURIComponent 'http%3A%2F%2Ffoo%2F~abc%2F%20hello%2C%20world!' |
| 関数・定数 | 内容 | 例 |
|---|---|---|
| abs | 絶対値を返す | result = Math.abs(-12.34) |
| exp | 自然対数eの引数乗を返す | result = Math.exp(12.34) |
| ceil | 引数より大きい最小の整数値を返す | result = Math.ceil(12.34) |
| floor | 引数より小さい最大の整数値を返す | result = Math.floor(12.34) |
| log | 自然対数を返す | result = Math.log(12.34) |
| max | 最大値を返す | result = Math.max(12, 21, 20) |
| min | 最小値を返す | result = Math.min(12, 21, 20) |
| pow | 第一引数の第二引数乗を返す | result = Math.pow(2, 3) |
| sqrt | 平方根を返す | result = Math.sqrt(12.34) |
| round | 小数部分以下第一位を四捨五入した値を返す | result = Math.round(34.56) |
| random | 0-1の範囲の乱数を返す | result = Math.random() |
| sin | sinを返す(rad.) | result = Math.sin(Math.PI/4) |
| cos | cosを返す(rad.) | result = Math.cos(Math.PI/4) |
| tan | tanを返す(rad.) | result = Math.tan(Math.PI/4) |
| asin | asinを返す(rad.) | result = Math.asin(Math.PI/4) |
| acos | acosを返す(rad.) | result = Math.acos(Math.PI/4) |
| atan | atanを返す(rad.) | result = Math.atan(Math.PI/4) |
| PI | π | result = Math.PI |
| E | 自然対数e | result = Math.E |
| 関数・定数 | 内容 | 例 |
|---|---|---|
| log | 標準出力にメッセージを出力する | console.log "%s, %s!", "Hello", "world" |
| error | 標準エラー出力にメッセージを出力する | console.error "%s, %s!", "Hello", "world" |
西本 圭佑 (NISHIMOTO Keisuke)
mailto: keisuken atmark cappuccino.ne.jp , Twitter: @keisuke_n
MITライセンス (MIT License)
Siphone Coffee Maker 0.2.4 (9.7MB)