-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
made a library more customisable for defining a key form which to take a unique value #65
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi! thank you for this PR. I think it's a good idea to do this as your use case showed. left some comments
@@ -110,3 +116,36 @@ Tests are written with [mocha](https://mochajs.org) | |||
```bash | |||
npm test | |||
``` | |||
|
|||
#Example of usage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there's already an example at the top of the readme
}); | ||
reader.read(); | ||
|
||
setInterval(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need for this with the interval
option
@@ -8,7 +8,7 @@ | |||
"json", | |||
"subscribe" | |||
], | |||
"version": "0.7.6", | |||
"version": "0.7.9", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the package auto updates the version once a PR is merged
requestOpts: {}, | ||
|
||
// keys to get a unique value from items, first not null will be used | ||
uniqueKeyNames: ['guid'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the default values, ['pubdate', 'lastbuilddate', 'updated']
@@ -64,8 +70,15 @@ export default class FeedSub extends TypedEmitter<FeedSubEvents> { | |||
skipDays : false, | |||
daysToSkip : null, | |||
requestOpts : {}, | |||
uniqueKeyNames : ['pubdate', 'lastbuilddate', 'updated'], | |||
getUniqueValueFromItem: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what do you think of removing this field and always using uniqueKeyNames
?
@@ -56,6 +61,7 @@ export default class FeedSub extends TypedEmitter<FeedSubEvents> { | |||
forceInterval : false, | |||
autoStart : false, | |||
emitOnStart : false, | |||
lastUniqueIdentifierValue : null, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about lastUniqueKey
No description provided.