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

micromustache

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

micromustache - npm Package Versions

234

8.0.3

Diff

userpixel
published 8.0.1 •

userpixel
published 8.0.0 •

Changelog

Source

8.0.0

  • The CommonJS file has changed name: V7=dist/micromustache.js v8=dist/micromustache.cjs. If you just use require('micromustache') it should work without any change.
  • The depth option is added
  • Updated the dependencies
  • Addressed known security issues

BREAKING CHANGES

  • The scope could be a function as well, but with this release we only accept Object.
  • Previously string characters could be accessed with array-index syntax, but now it is not possible (eg. render('{{str[0]}}', { str: 'Hello' }) will not return 'H' anymore)
  • Drop support for Safari10
userpixel
published 7.1.0 •

userpixel
published 7.0.0 •

Changelog

Source

7.0.0

BREAKING CHANGES:

  • The CLI is removed
  • Variable names cannot be longer than 1000 characters
userpixel
published 7.0.0-0 •

userpixel
published 6.1.1 •

userpixel
published 6.1.0 •

userpixel
published 6.0.1 •

userpixel
published 6.0.0 •

Changelog

Source

6.0.0

  • We no more try to JSON.stringify() arrays and objects. You can use .renderFn() to do that. There's still the get() utility function to help do the lookup.
  • Object bracket accessors are now supported: obj['foo'] (previously only obj.foo worked like Mustache and handlebars)
  • Rewrote the project in TypeScript
  • Custom resolver can also be async (see .renderFnAsync())
  • Compile and rendering is significantly faster than Mustache
  • A change in terminology to better reflect JavaScript terms: What Mustache and the previous version of the lib called view is not called scope.
  • Expose a CommonJS build for the browser limited to ECMAScript 5 features.

BREAKING CHANGES:

  • The biggest change is that if you used compile() in version 5, it returned a function but since version 6, it returns an object that has a render() function
  • The behaviour of the resolver function has changed: In v5 if the resolver threw an error we fell back to the standard .get() functionality but v6 just throws that error in an effort to make debugging easier.
  • We don't use default exports anymore so const render = require('micromustache/render') should be refactored to const { render } = require('micromustache')
  • Now the compiler returns a renderer object with a render() function
  • If you pass a non-string template it'll throw an error
  • If you provide a custom resolver and it throws, we throw and will not swallow that error
  • If one of the nested keys do not exist, we throw and will not swallow that error
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