Skip to content

Commit 93a3217

Browse files
authored
Update README.md
1 parent 48c2683 commit 93a3217

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ JagTag-JS is available on NPM and you can install it with `npm i @thesharks/jagt
2525
Basic syntax:
2626

2727
```js
28-
const JagTagParser = require('@thesharks/jagtag-js')
28+
import JagTagParser from '@thesharks/jagtag-js'
2929

3030
JagTagParser('string to parse', argsObject)
3131
```
@@ -37,7 +37,7 @@ For more information about the args object, see the [API reference](https://thes
3737
At its most basic level, JagTag-JS can be used to perform simple string-related operations without any complications.
3838

3939
```js
40-
const JagTagParser = require('@thesharks/jagtag-js')
40+
import JagTagParser from '@thesharks/jagtag-js'
4141

4242
JagTagParser('change {upper:this} to uppercase')
4343
// Returns 'change THIS to uppercase'
@@ -48,7 +48,7 @@ JagTagParser('change {upper:this} to uppercase')
4848
More advanced operations may require you to pass arguments to the parser in order to function correctly. Please check the [documentation](https://thesharks.github.io/JagTag-JS/interfaces/interfaces_iparserarguments.iparserarguments.html) for information on what parser-level arguments need to be passed for which method.
4949

5050
```js
51-
const JagTagParser = require('@thesharks/jagtag-js')
51+
import JagTagParser from '@thesharks/jagtag-js'
5252

5353
JagTagParser('{argslen} arguments were passed to this tag', { tagArgs: [ 'item1', 'item2', 'item3' ] })
5454
// Returns '3 arguments were passed to this tag'
@@ -59,7 +59,7 @@ JagTagParser('{argslen} arguments were passed to this tag', { tagArgs: [ 'item1'
5959
Since Javascript will attempt to interpret strings such as `'\d'` as character escapes, it's recommended to call the parser using `String.raw`.
6060

6161
```js
62-
const JagTagParser = require('@thesharks/jagtag-js')
62+
import JagTagParser from '@thesharks/jagtag-js'
6363

6464
JagTagParser('{replaceregex:\d|with:#|in:I have 5 cats and 23 shirts}')
6565
// Returns: "I have 5 cats an# 23 shirts"

0 commit comments

Comments
 (0)