string-template
string-template copied to clipboard
adding dot when parsing string templates
This is useful to be able to pass flattened objects to the template.
So you can do:
var user = { user: { name: 'Mark' }};
var flatUser = flatten(user); // => { "user.name": "Mark" }
var string = format('Hello {user.name}', flatUser);
Coverage remained the same at 100.0% when pulling ee257522aaa55467a67a04d9b4ceae80ae3b4066 on botverse:master into f63e51a5b60e98e5be1ed07da20332d415482edb on Matt-Esch:master.
Probably should also add "." to string-template/compile.js