YuriGor / mongoose-slug-updater

Schema-based slug plugin for Mongoose - single/compound - unique over collection/group - nested docs/arrays - relative/abs paths - sync on change: create/save/update/updateOne/updateMany/findOneAndUpdate tracked - $set operator - counter/shortId
MIT License
40 stars 13 forks source link

Add a feature in slug options to accept transform function #19

Closed farhantahir closed 4 years ago

farhantahir commented 4 years ago

Implements #18

YuriGor commented 4 years ago

Hi, very cool, thanks for PR! Could you please add test to cover this feature?

YuriGor commented 4 years ago

You can get this one as a starting point, but instead of stripping special chars use this new callback feature to strip tags

farhantahir commented 4 years ago

@YuriGor Added the test as guided, kindly have a look. Thanks!

YuriGor commented 4 years ago

Thank you a lot, your PR published on npm with v3.2.1