Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

updated README to include some API

  • Loading branch information...
commit de92c43688073f02306440868d0d5864af466230 1 parent 85b913d
@dresende authored
Showing with 18 additions and 0 deletions.
  1. +18 −0
@@ -1,3 +1,21 @@
+## API
+### setopt(options, [arguments])
+Set the `options` for your program. If `arguments` is not set, `process.argv` is used.
+Options is a string containing letters that correspond to the options you want. If a letter
+is proceeded by a `:`, the option has a required argument. If a letter is proceeded by double
+`:`, the option has an optional argument.
+This function throws exceptions when an invalid option is set and when a required option is
+not set.
+### getopt(callback)
+Callback will be called with 2 arguments, where the first is the option name (a letter) and
+the second is the option parameter(s) or the number of times the option has appeared.
## Example
An example is worth 1000 words..
Please sign in to comment.
Something went wrong with that request. Please try again.