summaryrefslogtreecommitdiff
path: root/std/flags/README.md
diff options
context:
space:
mode:
authorNayeem Rahman <nayeemrmn99@gmail.com>2020-06-12 20:23:38 +0100
committerGitHub <noreply@github.com>2020-06-12 15:23:38 -0400
commit1fff6f55c3ba98a10018c6d374795e612061e9b6 (patch)
tree12074b6d44736b11513d857e437f9e30a6bf65a4 /std/flags/README.md
parent26bf56afdaf16634ffbaa23684faf3a44cc10f62 (diff)
refactor: Don't destructure the Deno namespace (#6268)
Diffstat (limited to 'std/flags/README.md')
-rw-r--r--std/flags/README.md8
1 files changed, 3 insertions, 5 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