How to use the common-tags.trimResultTransformer function in common-tags

To help you get started, we’ve selected a few common-tags examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github DefinitelyTyped / DefinitelyTyped / common-tags / common-tags-tests.ts View on Github external
new commonTags.TemplateTag({});

new commonTags.TemplateTag({
    onEndResult: endResult => `${endResult}!`
});

new commonTags.TemplateTag({
    onSubstitution: substitution => `${substitution}!`,
    onEndResult: endResult => `${endResult}!`
});

/* Tests Built-in Transformers */

new commonTags.TemplateTag(commonTags.trimResultTransformer());
new commonTags.TemplateTag(commonTags.trimResultTransformer('left'));
new commonTags.TemplateTag(commonTags.trimResultTransformer('right'));

new commonTags.TemplateTag(commonTags.stripIndentTransformer());
new commonTags.TemplateTag(commonTags.stripIndentTransformer('initial'));
new commonTags.TemplateTag(commonTags.stripIndentTransformer('all'));

new commonTags.TemplateTag(commonTags.replaceResultTransformer('foo', 'bar'));

new commonTags.TemplateTag(commonTags.inlineArrayTransformer());
new commonTags.TemplateTag(commonTags.inlineArrayTransformer({}));
new commonTags.TemplateTag(commonTags.inlineArrayTransformer({separator: 'foo'}));
new commonTags.TemplateTag(commonTags.inlineArrayTransformer({conjunction: 'bar'}));

new commonTags.TemplateTag(commonTags.splitStringTransformer('foo'));
github DefinitelyTyped / DefinitelyTyped / common-tags / common-tags-tests.ts View on Github external
]);

new commonTags.TemplateTag({});

new commonTags.TemplateTag({
    onEndResult: endResult => `${endResult}!`
});

new commonTags.TemplateTag({
    onSubstitution: substitution => `${substitution}!`,
    onEndResult: endResult => `${endResult}!`
});

/* Tests Built-in Transformers */

new commonTags.TemplateTag(commonTags.trimResultTransformer());
new commonTags.TemplateTag(commonTags.trimResultTransformer('left'));
new commonTags.TemplateTag(commonTags.trimResultTransformer('right'));

new commonTags.TemplateTag(commonTags.stripIndentTransformer());
new commonTags.TemplateTag(commonTags.stripIndentTransformer('initial'));
new commonTags.TemplateTag(commonTags.stripIndentTransformer('all'));

new commonTags.TemplateTag(commonTags.replaceResultTransformer('foo', 'bar'));

new commonTags.TemplateTag(commonTags.inlineArrayTransformer());
new commonTags.TemplateTag(commonTags.inlineArrayTransformer({}));
new commonTags.TemplateTag(commonTags.inlineArrayTransformer({separator: 'foo'}));
new commonTags.TemplateTag(commonTags.inlineArrayTransformer({conjunction: 'bar'}));

new commonTags.TemplateTag(commonTags.splitStringTransformer('foo'));
github DefinitelyTyped / DefinitelyTyped / common-tags / common-tags-tests.ts View on Github external
new commonTags.TemplateTag({});

new commonTags.TemplateTag({
    onEndResult: endResult => `${endResult}!`
});

new commonTags.TemplateTag({
    onSubstitution: substitution => `${substitution}!`,
    onEndResult: endResult => `${endResult}!`
});

/* Tests Built-in Transformers */

new commonTags.TemplateTag(commonTags.trimResultTransformer());
new commonTags.TemplateTag(commonTags.trimResultTransformer('left'));
new commonTags.TemplateTag(commonTags.trimResultTransformer('right'));

new commonTags.TemplateTag(commonTags.stripIndentTransformer());
new commonTags.TemplateTag(commonTags.stripIndentTransformer('initial'));
new commonTags.TemplateTag(commonTags.stripIndentTransformer('all'));

new commonTags.TemplateTag(commonTags.replaceResultTransformer('foo', 'bar'));

new commonTags.TemplateTag(commonTags.inlineArrayTransformer());
new commonTags.TemplateTag(commonTags.inlineArrayTransformer({}));
new commonTags.TemplateTag(commonTags.inlineArrayTransformer({separator: 'foo'}));
new commonTags.TemplateTag(commonTags.inlineArrayTransformer({conjunction: 'bar'}));

new commonTags.TemplateTag(commonTags.splitStringTransformer('foo'));