-
Notifications
You must be signed in to change notification settings - Fork 75
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
adds the ability to ignore types by selector #94
adds the ability to ignore types by selector #94
Conversation
var identifier = extractor($(el)); | ||
|
||
var foundInIgnored = _.include(config.ignoredTypes, type); | ||
var foundInIgnored = _.find(config.ignoredTypes, function(ignoredTypeOrSelector) { | ||
return (ignoredTypeOrSelector === myType) || $(el).is(ignoredTypeOrSelector); |
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.
TIL is
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.
Yeah I found that in the original PR
You advanced to level 2
Wooooo
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.
lol
cfa981a
to
f55d768
Compare
}); | ||
|
||
it('should not include fields excluded by selector', function() { | ||
expect(this.result).not.to.have.ownProperty('b'); |
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.
oh i mean
expect(this.result).to.eql([....])
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.
Ah, gotcha.
Lightbulb 💡
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.
updated 👯
f55d768
to
64ebfb8
Compare
Ugh, hold this. I just wrote a failing testcase for the deserialize side of things
|
bad13b4
to
4493218
Compare
HA! Was due to a typo
|
4493218
to
de26ad9
Compare
Lgtm. Great work |
adds the ability to ignore types by selector
You can add a selector to
ignoredTypes
which will exclude the field from serialise / deserialise if it matches