Difference between revisions of "User:Mark Hershberger/vector.js"

From mwstake
Jump to: navigation, search
(Created page with " // Transform raw data into a query string // @param {array} printouts - example: ['?Capital of', '?Population'] // @param {object} parameters - example: {'limit': 10'} // @pa...")
 
Line 5: Line 5:
 
// @param {array|string} conditions - example: ['[[Category:Cities]]']
 
// @param {array|string} conditions - example: ['[[Category:Cities]]']
 
var query = new smw.query( "?Date", {'limit':1, "order":"descending"}, '[[Category:Events]]' ).toString();
 
var query = new smw.query( "?Date", {'limit':1, "order":"descending"}, '[[Category:Events]]' ).toString();
alert(query);
+
console.log(query);

Revision as of 17:16, 3 May 2019

// Transform raw data into a query string
// @param {array} printouts - example: ['?Capital of', '?Population']
// @param {object} parameters - example: {'limit': 10'}
// @param {array|string} conditions - example: ['[[Category:Cities]]']
var query = new smw.query( "?Date", {'limit':1, "order":"descending"}, '[[Category:Events]]' ).toString();
console.log(query);