How to use @jvitela/mustache-wax - 1 common examples

To help you get started, we’ve selected a few @jvitela/mustache-wax examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github odrick / free-tex-packer / src / client / exporters / index.js View on Github external
import list from './list.json';
import appInfo from '../../../package.json';
import {GET} from '../utils/ajax';
import mustache from 'mustache';
import wax from '@jvitela/mustache-wax';

wax(mustache);

mustache.Formatters = {
    add: (v1, v2) => {
        return v1 + v2;
    },
    subtract: (v1, v2) => {
        return v1 - v2;
    },
    multiply: (v1, v2) => {
        return v1 * v2;
    },
    divide: (v1, v2) => {
        return v1 / v2;
    },
    offsetLeft: (start, size1, size2) => {
        let x1 = start + size1 / 2;

@jvitela/mustache-wax

An extension for Mustache.js which enables the use of formatters inside of expressions

MIT
Latest version published 3 years ago

Package Health Score

48 / 100
Full package analysis

Popular @jvitela/mustache-wax functions