Skip to content

Commit

Permalink
update packages and add some documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jarrodconnolly committed Dec 19, 2019
1 parent f5a8919 commit bd6dcfb
Show file tree
Hide file tree
Showing 4 changed files with 253 additions and 376 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html
## [Unreleased]
- N/A

## [0.9.0] - 2019-12-18
- Added `incrementalReplacement` option to specify the slug counter separator
- Package upgrades for security warnings

## [0.8.0] - 2019-03-22
- Hook support for bulkCreate so slugs are added

Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ SequelizeSlugify.slugifyModel(User, {
source: ['givenName'],
slugOptions: { lower: true },
overwrite: false,
column: 'slug'
column: 'slug',
incrementalReplacement: '-',
});

```
Expand All @@ -39,7 +40,7 @@ Available Options
- `slugOptions` - (Default `{lower: true}`) Pass additional options for slug generation as defined by [`slug`](https://github.com/dodo/node-slug).
- `overwrite` - (Default `TRUE`) Change the slug if the source fields change once the slug has already been built.
- `column` - (Default `slug`) Specify which column the slug is to be stored into in the model.

- `incrementalReplacement` - (Default `-`) Specify the separator between the slug and the duplicate count
## Usage Examples

### Basic Usage
Expand Down
Loading

0 comments on commit bd6dcfb

Please sign in to comment.