Skip to content

Commit 6c65312

Browse files
committed
Update export paths
1 parent 3195abc commit 6c65312

File tree

6 files changed

+15
-12
lines changed

6 files changed

+15
-12
lines changed

docs/api-reference.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ An `Outcome` represents a `Success` or a `Failure` (for those coming from a func
6060
A `ParseResult` is an object of shape `{ value, ctx }` that holds the resulting value along with the new `Context`.
6161

6262
```js
63-
import { Outcome } from 'parser-lang/outcome';
63+
import { Outcome } from 'parser-lang';
6464

6565
let p = new Parser(ctx => {
6666
return Outcome.of({
@@ -566,7 +566,7 @@ Return the original outcome after applying `f` to the value for its effects.
566566
### Context
567567

568568
```js
569-
import Context from 'parser-lang/context`;
569+
import { Context } from 'parser-lang`;
570570
```
571571
572572
The **context** protocol defines a standard way for mutable iterable objects to be used in an "immutable" way by allowing consumers to make clones before performing mutations.

docs/tutorial.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ sequence(char('a'), char('b'))
105105
One downside of defining parser combinators using JavaScript functions and methods is that it can become difficult to read as the parsers grow in complexity. The way ParserLang approaches handling this problem is by allowing you to define your parsers using a declarative language in template literals:
106106

107107
```js
108-
import lang from 'parser-lang/lang';
108+
import { lang } from 'parser-lang';
109109

110110
let { a } = lang`
111111
a = 'a';

main.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
export { default } from './src/parser';
22
export * from './src/parser';
3+
export { default as Context } from './src/context';
4+
export { default as lang } from './src/lang';
5+
export * from './src/outcome';

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
{
2-
"name": "parser-combinators",
3-
"version": "1.0.0",
4-
"private": true,
5-
"description": "",
2+
"name": "parser-lang",
3+
"version": "0.1.0",
4+
"description": "A parser combinator library for JavaScript with declarative definition power",
65
"main": "index.js",
76
"module": "main.js",
7+
"keywords": ["parsing", "parse", "parser combinators", "template literals"],
88
"scripts": {
99
"lint": "prettier --check src/*.js",
1010
"test": "ava"
1111
},
12-
"author": "",
13-
"license": "ISC",
12+
"author": "Tim Disney",
13+
"license": "MIT",
1414
"dependencies": {
1515
"ava": "^2.1.0",
1616
"esm": "^3.2.20"

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ParserLang is parser combinator library. It lets you make parsers by combining o
77
Its primary superpower is the ability to define parsers declaratively with template literals:
88

99
```js
10-
import lang from 'parser-lang/lang';
10+
import { lang } from 'parser-lang';
1111

1212
let { calc } = lang`
1313
num = /[0-9]+/ > ${ch => parseInt(ch, 10)};

0 commit comments

Comments
 (0)