Skip to content

Instantly share code, notes, and snippets.

@andrewglind
Last active December 3, 2018 16:02
Show Gist options
  • Save andrewglind/a44edbf753499390f0942923a31c0196 to your computer and use it in GitHub Desktop.
Save andrewglind/a44edbf753499390f0942923a31c0196 to your computer and use it in GitHub Desktop.
Pass Node.js command-line args to Kotlin (JavaScript)
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