Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

barbe

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

barbe

Like mustache, but simple, tiny and fast.

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7.4K
increased by2.45%
Maintainers
1
Weekly downloads
 
Created
Source

barbe

Like mustache, but simple, tiny and fast.

Installation

$ npm install barbe

Example

// Require barbe
var Barbe = require("barbe");

// Use {curly braces}, which is default
console.log(Barbe("Hello {world}!", {
    world: "Mars"
}));

// Different separators
console.log(Barbe("Hello <world>!", ["<", ">"], {
    world: "World"
}));

// Use a function instead of a string
console.log(Barbe("Hello ###world##!", ["###", "##"], {
    world: function () {
        return "Sun";
    }
}));

Documentation

Barbe(text, arr, data)

Renders the input template including the data.

Params
  • String text: The template text.
  • Array arr: An array of two elements: the first one being the start snippet (default: "{") and the second one being the end snippet (default: "}").
  • Object data: The template data.
Return
  • String The rendered template.

How to contribute

  1. File an issue in the repository, using the bug tracker, describing the contribution you'd like to make. This will help us to get you started on the right foot.
  2. Fork the project in your account and create a new branch: your-great-feature.
  3. Commit your changes in that branch.
  4. Open a pull request, and reference the initial issue in the pull request message.

License

See the LICENSE file.

Keywords

FAQs

Package last updated on 29 May 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc