Add sprintf.js v1.0.2.

This script provides sprintf() for JavaScript. It can be used for
example for translating strings used in JavaScript with variables.

It is licensed under BSD-3-Clause and can be found on GitHub:
https://github.com/alexei/sprintf.js
This commit is contained in:
Klaus Weidenbach
2015-05-14 10:39:56 +02:00
parent f866a42a42
commit c62e75d789
15 changed files with 497 additions and 4 deletions

View File

@@ -0,0 +1,18 @@
angular.
module("sprintf", []).
filter("sprintf", function() {
return function() {
return sprintf.apply(null, arguments)
}
}).
filter("fmt", ["$filter", function($filter) {
return $filter("sprintf")
}]).
filter("vsprintf", function() {
return function(format, argv) {
return vsprintf(format, argv)
}
}).
filter("vfmt", ["$filter", function($filter) {
return $filter("vsprintf")
}])