Code snippet screenshot :
import { createBranchlet } from '@branchlet/core';
const { parse } = createBranchlet();
const template = 'You have {{ count, =0:no items, =1:one item, {count} items }} in your cart.';
parse(template, { count: 0 }); // "You have no items in your cart."
parse(template, { count: 1 }); // "You have one item in your cart."
parse(template, { count: 5 }); // "You have 5 items in your cart."
Just created Branchlet, a fast and extensible string processor for handling conditional text logic in i18n strings ๐
github.com/CorentinTh/b...