summaryrefslogtreecommitdiff
path: root/std/flags
diff options
context:
space:
mode:
Diffstat (limited to 'std/flags')
-rw-r--r--std/flags/README.md8
-rw-r--r--std/flags/mod.ts5
2 files changed, 5 insertions, 8 deletions
diff --git a/std/flags/README.md b/std/flags/README.md
index 0b7f7fa65..ebfc346e1 100644
--- a/std/flags/README.md
+++ b/std/flags/README.md
@@ -5,10 +5,9 @@ Command line arguments parser for Deno based on minimist
# Example
```ts
-const { args } = Deno;
import { parse } from "https://deno.land/std/flags/mod.ts";
-console.dir(parse(args));
+console.dir(parse(Deno.args));
```
```
@@ -57,11 +56,10 @@ options can be:
example:
```ts
// $ deno run example.ts -- a arg1
- const { args } = Deno;
import { parse } from "https://deno.land/std/flags/mod.ts";
- console.dir(parse(args, { "--": false }));
+ console.dir(parse(Deno.args, { "--": false }));
// output: { _: [ "a", "arg1" ] }
- console.dir(parse(args, { "--": true }));
+ console.dir(parse(Deno.args, { "--": true }));
// output: { _: [], --: [ "a", "arg1" ] }
```
- `options.unknown` - a function which is invoked with a command line parameter
diff --git a/std/flags/mod.ts b/std/flags/mod.ts
index 5c8fcc0d9..a961e6c68 100644
--- a/std/flags/mod.ts
+++ b/std/flags/mod.ts
@@ -15,11 +15,10 @@ export interface ArgParsingOptions {
* the result `['--']` with everything after the `--`. Here's an example:
*
* // $ deno run example.ts -- a arg1
- * const { args } = Deno;
* import { parse } from "https://deno.land/std/flags/mod.ts";
- * console.dir(parse(args, { "--": false }));
+ * console.dir(parse(Deno.args, { "--": false }));
* // output: { _: [ "a", "arg1" ] }
- * console.dir(parse(args, { "--": true }));
+ * console.dir(parse(Deno.args, { "--": true }));
* // output: { _: [], --: [ "a", "arg1" ] }
*
* Defaults to `false`.