Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
window.$api = api;
window.$ = $;
window._ = function(){
console.log.apply(console, arguments);
}
}
return module.exports = {
get_tpl : get_tpl,
route_go : route_go,
vms : vms,
session : session,
startup : startup,
localStorage : localStorage ,
json_decode : $.parseJSON,
format : format.format,
otime : format.niceTimeWord
};
});
var b = require('bindings')('spotify.node');
var Session = require('./Session');
var Track = require('./Track');
var util = require('util');
var EventEmitter = require('events').EventEmitter;
var format = require('format').format;
/**
* This class allows to run searches on the spotify database
* You can either create it from a string or specify single fields
* with the adequate methods
* @constructor
* @param {Session} session, the session to attach this search to (optional)
* @param {String} search, a query to run (optional)
*/
function Search (session, query) {
if(session && session instanceof Session) {
this._session = session;
}
else {
this._session = Session.currentSession;
}