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:
18
library/sprintf.js/src/angular-sprintf.js
vendored
Normal file
18
library/sprintf.js/src/angular-sprintf.js
vendored
Normal 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")
|
||||
}])
|
||||
Reference in New Issue
Block a user