Giter Club home page Giter Club logo

plugin-node-pattern-lab-handlebars-helpers's Introduction

Handlerbars.js helpers for Pattern Lab

Registers additional Handlebars helper in Pattern Lab Node version.

slugify helper

Based on handlebars-helper-slugify

The slugify helper takes 1 argument: str

Example

{{ slugify 'I am a title' }}

Renders to:

i-am-a-title

bemModfier helper

The bemModfier helper takes 2 arguments: block, modifier

Example

{{ bemModifier 'block' [ 'modifier-1', 'modifier-2' ] }}

Renders to:

block block--modifier-1 block--modifier-2

bemElementOf helper

The bemElementOf helper takes 2 arguments: block, element

Example

{{ bemElementOf 'block' 'element' }}

Renders to:

block__element

compare helper (stolen form hellokatili)

The compare helper takes 3 arguments: value1 operator value2

Example

{{#compare unicorns '!=' ponies}}
  I knew it, unicorns are NOT ponies!
{{/compare}}

math helper (stolen form hellokatili)

The math helper takes 3 arguments: value1 operator value2

Example

{{math 5 '+' 37}}

Renders to:

42

plugin-node-pattern-lab-handlebars-helpers's People

Watchers

 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.