How to use the format.format function in format

To help you get started, we’ve selected a few format examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github argolab / jsbbs / js / lib.js View on Github external
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
    };
        
});
github Floby / node-libspotify / lib / Search.js View on Github external
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;
    }