Last active
December 3, 2018 16:02
-
-
Save andrewglind/a44edbf753499390f0942923a31c0196 to your computer and use it in GitHub Desktop.
Pass Node.js command-line args to Kotlin (JavaScript)
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
package blah | |
fun Main(args: List<String>) { | |
// ... your code goes here | |
} | |
external val process: dynamic | |
fun main(args: Array<String>) { | |
Main((process["argv"] as Array<String>).drop(2)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment