Publish Vulpes Preview 15 sources for desktop, Android and Tundra
Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
This commit is contained in:
parent
93e3a48004
commit
b38dea0597
25901 changed files with 9982925 additions and 369 deletions
17
gaia/apps/calendar/js/format.js
Executable file
17
gaia/apps/calendar/js/format.js
Executable file
|
|
@ -0,0 +1,17 @@
|
|||
define(function(require, exports, module) {
|
||||
'use strict';
|
||||
|
||||
var FORMAT_REGEX = /%([0-9])?s/g;
|
||||
|
||||
module.exports = function() {
|
||||
var args = Array.prototype.slice.call(arguments);
|
||||
|
||||
var i = 0;
|
||||
var str = args.shift();
|
||||
return str.replace(FORMAT_REGEX, function(match, pos) {
|
||||
var index = parseInt(pos || i++, 10);
|
||||
return args[index];
|
||||
});
|
||||
};
|
||||
|
||||
});
|
||||
Loading…
Reference in a new issue