Giter Site home page Giter Site logo

dot's Introduction

doT

Created in search of the fastest and concise JavaScript templating function with emphasis on performance under V8 and nodejs. It shows great performance for both nodejs and browsers.

doT.js is fast, small and has no dependencies.

See jsperf benchmarks for an equal playground (encodes HTML values) comparison.

Features

  • custom delimiters
  • runtime evaluation
  • runtime interpolation
  • compile-time evaluation
  • partials support
  • conditionals support
  • array iterator
  • encoding
  • control whitespace - strip or preserve
  • streaming friendly
  • use it as logic-less or with logic, it is up to you
  • ! coffeescript block
  • ! comment
  • ! object iterator

original doT playground

Differences

I created this fork for two reasons:

  1. doT templates are hard as heck to debug.
  2. No comment feature.

To get meaningful errors, set dot.templateSettings

{ append: false, strip: false }

New Features

Comments

{{-- This is a comment }}

CoffeeScript blocks

{{`cs
    a = it?.prop || 'default'
}}

Object iterator

{{. it.fruits :value :key }}
    {{= key}} = {{= value}}
{{.}}

License

  • doT is an open source component of http://bebedo.com
  • doT is licensed under the MIT License. (See LICENSE-DOT)

dot's People

Contributors

olado avatar rdworth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

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.