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

You can simplify the examples (and possibly the syntax) #2

Open
jbreckman opened this issue Jun 10, 2019 · 0 comments
Open

You can simplify the examples (and possibly the syntax) #2

jbreckman opened this issue Jun 10, 2019 · 0 comments

Comments

@jbreckman
Copy link

jbreckman commented Jun 10, 2019

You can actually invoke functions as parameters via backtick directly. So the following actually works:

left ᐊ = str => str + 'left';

return ᐊ`
     {
       "thing": true
     }`;

If you don't want to use a special symbol it might be nice to call it dd or something really short. Then you can just say:

import { dd } from 'dentist';

const str = dd`
  Hi, check out the following line:

    it's indented!
  
  Crazy!
`;

Just a thought. Love the idea of the package!

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

1 participant