Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Add support for nester properties #14

Open
gyleg5 opened this issue Aug 25, 2016 · 4 comments
Open

Feature Request: Add support for nester properties #14

gyleg5 opened this issue Aug 25, 2016 · 4 comments

Comments

@gyleg5
Copy link

gyleg5 commented Aug 25, 2016

Please merge pull request #11 , this will be very useful for me. Great module!

@educastellano
Copy link

Any plans on giving support to this? :)

@thetutlage
Copy link

Try this https://www.npmjs.com/package/pope

@educastellano
Copy link

@thetutlage Nice! but I also ended up making my own package:

https://www.npmjs.com/package/template-format

😅

@arthurlacoste
Copy link

I've worked on a feature like this. For example, you can use recursively a YAML as a string to parse AND args object to replace.

const tampax = require('tampax');

const yamlString = `
dude:
  name: Arthur
weapon:
  favorite: Excalibur
  useless: knife
sentence: "{{dude.name}} use {{weapon.favorite}}. The goal is {{goal}}."`;

const r = tampax.yamlParseString(yamlString, { goal: 'to kill Mordred' });
console.log(r.sentence);

// output : "Arthur use Excalibur. The goal is to kill Mordred."

The repo is here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants