-
Notifications
You must be signed in to change notification settings - Fork 102
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
feat: support key re-use from serialized path #474
Conversation
Codecov Report
@@ Coverage Diff @@
## master #474 +/- ##
==========================================
+ Coverage 98.24% 98.25% +0.01%
==========================================
Files 5 5
Lines 684 689 +5
Branches 159 161 +2
==========================================
+ Hits 672 677 +5
Partials 12 12
Continue to review full report at Codecov.
|
src/entity.ts
Outdated
* @name Key#serialized | ||
* @type {array} | ||
*/ | ||
Object.defineProperty(this, 'serialized', { |
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.
Why use Object.defineProperty
as opposed to a regular getter?
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.
Give it a few years-- Object.defineProperty
will be in style again, and the kids will be wearing it on their hoodies.
a497bff
to
800c1ed
Compare
Fixes #59
This exposes a
serialized
property on a Key object. It will correctly differentiate between a key name and id, so that you can re-create a key with it: