From 19168dbb5cdd505796861699ca9e75757ce28890 Mon Sep 17 00:00:00 2001 From: Giovanni Minotti Date: Tue, 12 May 2020 14:29:54 +0200 Subject: [PATCH 1/2] Added NPM Runkit example --- documentation/examples/runkit-example.js | 4 ++++ package.json | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 documentation/examples/runkit-example.js diff --git a/documentation/examples/runkit-example.js b/documentation/examples/runkit-example.js new file mode 100644 index 000000000..7c8159a52 --- /dev/null +++ b/documentation/examples/runkit-example.js @@ -0,0 +1,4 @@ +const got = require("got"); +const ISS = "http://api.open-notify.org/iss-now.json"; + +(await got(ISS).json()).iss_position; \ No newline at end of file diff --git a/package.json b/package.json index 9ac633aea..e75176021 100644 --- a/package.json +++ b/package.json @@ -125,5 +125,6 @@ "@typescript-eslint/method-signature-style": "off", "unicorn/no-fn-reference-in-iterator": "off" } - } + }, + "runkitExampleFilename": "./documentation/examples/runkit-example.js" } From 69f0940402f256a36cc155dff80822a03eb955bc Mon Sep 17 00:00:00 2001 From: Giovanni Minotti Date: Tue, 12 May 2020 17:12:14 +0200 Subject: [PATCH 2/2] Update documentation/examples/runkit-example.js Co-authored-by: Szymon Marczak <36894700+szmarczak@users.noreply.github.com> --- documentation/examples/runkit-example.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/examples/runkit-example.js b/documentation/examples/runkit-example.js index 7c8159a52..20b47c8a2 100644 --- a/documentation/examples/runkit-example.js +++ b/documentation/examples/runkit-example.js @@ -1,4 +1,4 @@ const got = require("got"); const ISS = "http://api.open-notify.org/iss-now.json"; -(await got(ISS).json()).iss_position; \ No newline at end of file +(await got(ISS).json()).iss_position;