Skip to content

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

@jbreckman

Description

@jbreckman

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions