You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Make Your Own Template Tag](#make-your-own-template-tag)
52
53
-[Class is in Session: TemplateTag](#class-is-in-session-templatetag)
53
54
-[The Anatomy of a Transformer](#the-anatomy-of-a-transformer)
@@ -482,6 +483,20 @@ oneLine(String.raw)`
482
483
483
484
484
485
486
+
487
+
### Calling with strings
488
+
489
+
Sometimes you might want to use a tag on a normal string (e.g. for stripping the indentation). For that purpose just call a tag as a function with the passed string:
490
+
491
+
```js
492
+
import {stripIndent} from'common-tags'
493
+
494
+
stripIndent(" foo\n bar")
495
+
// "foo\n bar"
496
+
```
497
+
498
+
499
+
485
500
### Make Your Own Template Tag
486
501
487
502
`common-tags` exposes an interface that allows you to painlessly create your own template tags.
0 commit comments