()
| 6 | } |
| 7 | |
| 8 | export function format() { |
| 9 | let args = [].slice.call(arguments), |
| 10 | str = args.shift(); |
| 11 | return str.replace(/{(\d+)}/g, function(match, number) { |
| 12 | return args[number] !== undefined |
| 13 | ? args[number] |
| 14 | : match; |
| 15 | }); |
| 16 | } |
| 17 | |
| 18 | export function substitute(str, obj) { |
| 19 | if (typeof str === 'string') { |
no outgoing calls
no test coverage detected
searching dependent graphs…