Skip to content

Conversation

@gkellogg
Copy link
Collaborator

which was preventing cases when keyword alias had @type defined, as in Compact 0073.

…venting cases when keyword alias had `@type` defined, as in Compact 0073.
@gkellogg gkellogg added this to the v0.5.0 milestone Jan 21, 2018
@gkellogg gkellogg changed the title Remove shortcut for compactIri when iri is a keyword Remove shortcut from compactIri when iri is a keyword Jan 22, 2018
}
return iri;
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another option would be to leave this in place, and exit quickly if an iri is found, and otherwise continue. That would allow for more complicated behavior, while keeping the typical case fast.

lib/compact.js Outdated
return inverseCtx[iri]['@none']['@type']['@none'];
}
return iri;
// if term is a keyword, it can may be compacted to a simple alias
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

type: it can may be => it may be compacted

@dlongley
Copy link
Member

LGTM, just noticed a typo in a comment.

@davidlehn davidlehn merged commit 62651aa into 0.5.x Jan 25, 2018
@davidlehn davidlehn deleted the keyword-aliases-with-type branch January 25, 2018 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants