-
Notifications
You must be signed in to change notification settings - Fork 12
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
Add DataFactory method to create from existing term #137
Comments
For consistency, we may also want add a similar method for converting |
I could make PR for (Term or Quad) clone((Term or Quad) other) I think in this case we don't allow |
@elf-pavlik I would propose creating separate methods for cloning terms and quads ( |
fromTerm/fromQuad? |
👎 for I favor |
|
PR #158 |
DataFactory methods to create from existing term and quad | closes #137
Sorry I just noticed this, but I'm curious... Why not pass a plain object to the Term or Quad functions directly? |
As I replied on https://gitter.im/rdfjs/public?at=5cb48398c55bd14d35ebcf88 single factory object makes it much easier to pass it around. Spec only defines methods on the factory and doesn't define any constructors for specific terms. |
We want to consider adding a method to
DataFactory
that takes aTerm
-shaped object (from any library) as input, and outputs aTerm
(from the library of theDataFactory
) thatequals
it.This can be used to convert a
Term
from one RDF/JS implementation to another.The text was updated successfully, but these errors were encountered: