Skip to content

Commit 195c32e

Browse files
ljharbfilipre
andcommitted
[readme] fix typos
Co-authored-by: Jordan Harband <[email protected]> Co-authored-by: René Filip <[email protected]>
1 parent 9e8bc20 commit 195c32e

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@ This package implements the [es-shim API](https://github.com/es-shims/api) inter
1818
Most common usage:
1919
```js
2020
var flags = require('regexp.prototype.flags');
21+
var assert = require('assert');
2122

2223
assert(flags(/a/) === '');
23-
assert(flags(new RegExp('a') === '');
24+
assert(flags(new RegExp('a')) === '');
2425
assert(flags(/a/mig) === 'gim');
2526
assert(flags(new RegExp('a', 'mig')) === 'gim');
2627

@@ -29,7 +30,7 @@ if (!RegExp.prototype.flags) {
2930
}
3031

3132
assert(flags(/a/) === /a/.flags);
32-
assert(flags(new RegExp('a') === new RegExp('a').flags);
33+
assert(flags(new RegExp('a')) === new RegExp('a').flags);
3334
assert(flags(/a/mig) === /a/mig.flags);
3435
assert(flags(new RegExp('a', 'mig')) === new RegExp('a', 'mig').flags);
3536
```

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"tests-only": "nyc tape 'test/**/*.js'",
1919
"prelint": "eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git')",
2020
"lint": "eslint --ext=js,mjs .",
21-
"postlint": "es-shim-api --bound",
21+
"postlint": "evalmd README.md && es-shim-api --bound",
2222
"version": "auto-changelog && git add CHANGELOG.md",
2323
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
2424
},
@@ -54,6 +54,7 @@
5454
"eclint": "^2.8.1",
5555
"es-value-fixtures": "^1.4.2",
5656
"eslint": "=8.8.0",
57+
"evalmd": "^0.0.19",
5758
"for-each": "^0.3.3",
5859
"functions-have-names": "^1.2.3",
5960
"has-strict-mode": "^1.0.1",

0 commit comments

Comments
 (0)