
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Like mustache, but simple, tiny and fast.
$ npm i --save barbe
const barbe = require("barbe");
// Use {curly braces}, which is default
console.log(barbe("Hello {world}!", {
world: "Mars"
}));
// => "Hello Mars!"
// Different separators
console.log(barbe("Hello <world>!", ["<", ">"], {
world: "World"
}));
// => "Hello World!"
// Use a function instead of a string
console.log(barbe("Hello ###world##!", ["###", "##"], {
world: function () {
return "Sun";
}
}));
// => "Hello Sun!"
// Use a function instead of a string
console.log(barbe("Hello {{worlds.pluto}} from {{worlds.earth}}!", ["{{", "}}"], {
worlds: {
pluto: function () {
return "Pluto";
}
, earth: "Earth"
}
}));
// => "Hello Pluto from Earth!"
barbe(text, arr, data)
Renders the input template including the data.
text
: The template text.arr
: An array of two elements: the first one being the start snippet (default: "{"
) and the second one being the end snippet (default: "}"
).data
: The template data.Have an idea? Found a bug? See how to contribute.
Another way to support the development of my open-source modules is to set up a recurring donation, via Patreon. :rocket:
PayPal donations are appreciated too! Each dollar helps.
Thanks! :heart:
If you are using this library in one of your projects, add it in this list. :sparkles:
emojer
—Emojify all the things.err
—A tiny library to create custom errors in JavaScript.github-old-header
—Brings the old header links back.kindly-license
—A human readable license for projects created by human-beings.match
—Simplest way to create match memory games.ship-release
—Publish new versions on GitHub and npm with ease.showalicense.com
—A site to provide an easy way to show licenses and their human-readable explanations.FAQs
Like mustache, but simple, tiny and fast.
The npm package barbe receives a total of 7,794 weekly downloads. As such, barbe popularity was classified as popular.
We found that barbe demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.