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

mustache

Package Overview
Dependencies
Maintainers
4
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mustache - npm Package Versions

234

4.2.0

Diff

Changelog

Source

[4.2.0] / 28 March 2021

Added

  • [#773]: Add package.json exports field, by [@manzt].
flipp
published 4.2.0-beta.0 •

flipp
published 4.1.1-beta.0 •

flipp
published 4.1.0 •

Changelog

Source

[4.1.0] / 6 December 2020

Added

  • [#764]: render() now recognizes a config object argument, by [@pineapplemachine].

Fixed

  • [#764]: Ask custom escape functions to escape all types of values (including numbers), by [@pineapplemachine].
flipp
published 4.0.1 •

Changelog

Source

[4.0.1] / 15 March 2020

Fixed

  • [#739]: Fix custom delimiters in nested partials, by [@aielo].
flipp
published 4.0.0 •

Changelog

Source

[4.0.0] / 16 January 2020

Majority of using projects don't have to worry by this being a new major version.

TLDR; if your project manipulates Writer.prototype.parse | Writer.cache directly or uses .to_html(), you probably have to change that code.

This release allows the internal template cache to be customised, either by disabling it completely or provide a custom strategy deciding how the cache should behave when mustache.js parses templates.

const mustache = require('mustache');

// disable caching
Mustache.templateCache = undefined;

// or use a built-in Map in modern environments
Mustache.templateCache = new Map();

Projects that wanted to customise the caching behaviour in earlier versions of mustache.js were forced to override internal method responsible for parsing templates; Writer.prototype.parse. In short, that was unfortunate because there is more than caching happening in that method.

We've improved that now by introducing a first class API that only affects template caching.

The default template cache behaves as before and is still compatible with older JavaScript environments. For those who wants to provide a custom more sopisiticated caching strategy, one can do that with an object that adheres to the following requirements:

{
  set(cacheKey: string, value: string): void
  get(cacheKey: string): string | undefined
  clear(): void
}

Added

  • [#731]: Allow template caching to be customised, by [@AndrewLeedham].

Removed

  • [#735]: Remove .to_html(), by [@phillipj].
flipp
published 3.2.1 •

Changelog

Source

[3.2.1] / 30 December 2019

Fixed

  • [#733]: Allow the CLI to use JavaScript views when the project has ES6 modules enabled, by [@eobrain].
flipp
published 3.2.0 •

Changelog

Source

[3.2.0] / 18 December 2019

Added

  • [#728]: Expose ECMAScript Module in addition to UMD (CommonJS, AMD & global scope), by [@phillipj] and [@zekth].
flipp
published 3.2.0-beta.0 •

flipp
published 3.1.0 •

Changelog

Source

[3.1.0] / 13 September 2019

Added

  • [#717]: Added support .js files as views in command line tool, by [@JEStaubach].

Fixed

  • [#716]: Bugfix for indentation of inline partials, by [@yotammadem].
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