GithubHelp home page GithubHelp logo

tempura's Introduction

DEPRECATED: This package has been deprecated in favor of common-tags.

tempura

npm version Build Status Dependency Status devDependency Status

Template literal utilities under the form of tags

Usage

noMultiSpaceAfterLineFeed

Utility to write template literals without having to worry about whitespace after newline feeds and before text, and newline feeds.

import {noMultiSpaceAfterLineFeed} from 'tempura';

const myMultilineString = noMultiSpaceAfterLineFeed`
   My Super String
   That is well indented.
`;

console.log(myMultilineString);

/* Outputs the following
My Super String
That is well indentend
*/

noMultiLine

Utility to remove all newline characters from a template literal.

import {noMultiLine} from 'tempura';

const myMultilineString = noMultiLine`
expression that should

be on a single line
but is multilined for line length
`;

console.log(myMultilineString);

/* Outputs the following
expression that shouldbe on a single linebut is multilined for line length
*/

noWhitespace

Utility to remove all whitespace in template literals.

import {noWhitespace} from 'tempura';

const myStringWithWhiteSpace = noWhitespace`
expression that shouldn't have whitespace in it,
but has some for clarity in code
`;

console.log(myStringWithWhiteSpace);

/* Outputs the following
expressionthatshouldn'thavewhitespaceinit,buthassomeforclarityincode
*/

tempura's People

Contributors

mathieumg avatar dozoisch avatar

Stargazers

Roman avatar Alex Shemetovskiy avatar Nikos M. avatar Maxime Poulin avatar  avatar

Watchers

James Cloos avatar  avatar  avatar

tempura's Issues

link to spec/tool that supports this?

This looks cool. I am not familiar with what part of what spec/tool executes these tags, though. Haven't seen this syntax, that I can remember.

Can you add a link/blurb to the README to whatever powers this? I'd like to read more. ๐Ÿ˜Š

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.