Tobias Gritschacher has submitted this change and it was merged. Change subject: (minor) add wb.Snak.prototype.toMap() and wb.Snak.newFromMap() ......................................................................
(minor) add wb.Snak.prototype.toMap() and wb.Snak.newFromMap() Adds those two functions which are very similar to toJSON() and newFromJSON(). The plain object returned by both has the same fields. The difference is that the object's fields returned by the 'map' version do not have to be JSON. In case of PropertyValueSnak the 'datavalue' field will be the dataValues.DataValue object which would be returned by wb.PropertyValueSnak.prototype.getValue. Change-Id: I794b87a716e0df0b8d64c8712fe1b8b3318a1767 --- M lib/resources/wikibase.datamodel/wikibase.PropertyValueSnak.js M lib/resources/wikibase.datamodel/wikibase.Snak.js M lib/tests/qunit/wikibase.datamodel/Wikibase.snak.tests.js 3 files changed, 98 insertions(+), 38 deletions(-) Approvals: Tobias Gritschacher: Verified; Looks good to me, approved -- To view, visit https://gerrit.wikimedia.org/r/43207 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I794b87a716e0df0b8d64c8712fe1b8b3318a1767 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Daniel Werner <[email protected]> Gerrit-Reviewer: Tobias Gritschacher <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
