Skip to content

Commit

Permalink
Getting rid of the default export
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliver Kovacs committed Nov 3, 2016
1 parent 8063339 commit b20f5b2
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ $ yarn add traverse-dom
## Usage

```
import traverse from 'traverse-dom';
import { traverse } from 'traverse-dom';
traverse(myElement, (child) => { mutateElement(child) });
```

Expand Down
2 changes: 1 addition & 1 deletion examples/blockquote.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import $ from 'jquery';
import assert from 'assert';

import traverse, { traverseReduce } from '../dist/traverse-dom';
import { traverse, traverseReduce } from '../dist/traverse-dom';

const originalDOM = $(`
<div id="blockquote-clean">
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "traverse-dom.js",
"scripts": {
"clean": "rm -f dist/*.js*",
"test": "testem ci -f -P 10",
"test": "testem ci -P 10",
"test:dev": "testem",
"test:examples": "testem ci -f examples/testem.json",
"lint": "eslint src test && flow check",
Expand Down
2 changes: 1 addition & 1 deletion src/traverse-dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ function result<T>(param: (boolean | (t: T) => boolean)): (t: T) => boolean {
return (typeof param === 'function') ? param : () => Boolean(param);
}

export default function traverse(
export function traverse(
element: Element,
callback: (child: Element) => void,
shouldRecurse: boolean | (child: Element) => boolean = false,
Expand Down
3 changes: 2 additions & 1 deletion test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import assert from 'assert';

import { pushNodeNamesTo } from './utils/callbacks';

import traverse, {
import {
traverse,
traverseNodes,
traverseMap,
} from '../src/traverse-dom';
Expand Down

0 comments on commit b20f5b2

Please sign in to comment.