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

providing {function}String as the argument for result #11

Open
wolfkeymedia opened this issue Jan 10, 2017 · 2 comments
Open

providing {function}String as the argument for result #11

wolfkeymedia opened this issue Jan 10, 2017 · 2 comments

Comments

@wolfkeymedia
Copy link

Hi, sorry if this is a noobish question, but i'm tying to get the result as the 2nd parameter of the transform() callback. I'm unsure what is meant by 'provide {function} String as argument for config.result property'. Again, i'm a noob so I apologize...

a quick code example would clear this up for me and teach me for the future.

Thanks

@eraserfusion
Copy link

@barrywillis13, I struggled with this for a while as well. The result needs to be a file name, String, or Buffer. e.g.

let config = {
  xsltPath: 'test.xsl',
  sourcePath: 'test-data.xml',
  result: Buffer,
  props: {
    indent: 'yes'
  }
};

@wolfkeymedia
Copy link
Author

@eraserfusion, thanks a lot! That has been bothering me for ages, you're a legend!

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

2 participants