From e6d4ac42b03b5ee1833930c49189d43043288dd0 Mon Sep 17 00:00:00 2001 From: Alex Corvi Date: Fri, 3 Apr 2020 23:46:45 +0300 Subject: [PATCH] Update getting-started.md --- docs/getting-started.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/getting-started.md b/docs/getting-started.md index ecf4ebf..ccf053a 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -12,7 +12,7 @@ or download the single file compiled version from [the github repository](https: ```javascript // If you're using NPM/Yarn, then you need // to require the library first -const anchorme = require("anchorme"); // like this +const anchorme = require("anchorme").default; // like this import anchorme from "anchorme"; // or this // the library will export a single function @@ -26,24 +26,24 @@ const resultC = anchorme({ options: { attributes: { target: "_blank", - class: "detected" - } + class: "detected", + }, }, // and extensions extensions: [ // an extension for hashtag search { test: /#(\w|_)+/gi, - transform: string => - `${string}` + transform: (string) => + `${string}`, }, // an extension for mentions { test: /@(\w|_)+/gi, - transform: string => - `${string}` - } - ] + transform: (string) => + `${string}`, + }, + ], }); ```