Skip to content

Commit

Permalink
fix: update readme to named exports
Browse files Browse the repository at this point in the history
  • Loading branch information
tommy-mitchell committed Mar 20, 2023
1 parent 92ee3f4 commit e2c177e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ $ npm install trim-newlines
## Usage

```js
import trimNewlines from 'trim-newlines';
import {trimNewlines, trimNewlinesStart, trimNewlinesEnd} from 'trim-newlines';

trimNewlines('\n🦄\r\n');
//=> '🦄'

trimNewlines.start('\n🦄\r\n');
trimNewlinesStart('\n🦄\r\n');
//=> '🦄\r\n'

trimNewlines.end('\n🦄\r\n');
trimNewlinesEnd('\n🦄\r\n');
//=> '\n🦄'
```

Expand All @@ -29,11 +29,11 @@ trimNewlines.end('\n🦄\r\n');

Trim from the start and end of a string.

### trimNewlines.start(string)
### trimNewlinesStart(string)

Trim from the start of a string.

### trimNewlines.end(string)
### trimNewlinesEnd(string)

Trim from the end of a string.

Expand Down

0 comments on commit e2c177e

Please sign in to comment.