sindresorhus / pupa

Simple micro templating
MIT License
362 stars 22 forks source link

Feature request: reentrant templates #26

Closed jfoutts-avenue8 closed 2 years ago

jfoutts-avenue8 commented 2 years ago
pupa('Number is {phone.{type}}', {
  type: 'mobile',
  phone: {
    mobile: '333',
    home: '444'
  }
})
// => 'Number is {phone.mobile}'
// Would be amazing if this was:
// => 'Number is 333'
jfoutts-avenue8 commented 2 years ago

Maybe out of scope for 'simple' templating. I'll try es6-template-strings.