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

mu2

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mu2 - npm Package Compare versions

Comparing version 0.5.8 to 0.5.9

lib/mu/stream.js

2

lib/mu.js
var util = require('util'),
fs = require('fs'),
path = require('path'),
Stream = require('stream').Stream,
Stream = require('./mu/stream'),
parser = require('./mu/parser'),

@@ -6,0 +6,0 @@ renderer = require('./mu/renderer'),

var util = require('util'),
Buffer = require('buffer').Buffer,
carriage = '__MU_CARRIAGE__',
carriageRegExp = new RegExp(carriage, 'g'),
newline = '__MU_NEWLINE__',

@@ -13,3 +15,4 @@ newlineRegExp = new RegExp(newline, 'g');

function Parser(template, options) {
this.template = template.replace(/\n/g, newline);
this.template = template.replace(/\r\n/g, carriage)
.replace(/\n/g, newline);
this.options = options || {};

@@ -59,3 +62,5 @@

var content = this.buffer.substring(0, index).replace(newlineRegExp, '\n');
var content = this.buffer.substring(0, index)
.replace(carriageRegExp, '\r\n')
.replace(newlineRegExp, '\n');
buffer = new Buffer(Buffer.byteLength(content));

@@ -62,0 +67,0 @@

@@ -27,3 +27,3 @@ var BUFFER_LENGTH = 1024 * 8;

if (stream.paused) {
stream.on('drain', function () {
stream.on('resumed', function () {
process.nextTick(next);

@@ -30,0 +30,0 @@ });

{ "name": "mu2"
, "description": "A Mustache template engine for Node.js"
, "keywords": ["template", "mustache"]
, "version" : "0.5.8"
, "version" : "0.5.9"
, "homepage": "http://github.com/raycmorgan/mu"

@@ -6,0 +6,0 @@ , "author" : "RayMorgan <ray@rumgr.com>"

@@ -10,2 +10,3 @@ var assert = require('assert'),

'boolean',
'carriage_return',
'comments',

@@ -25,3 +26,3 @@ 'complex',

'two_in_a_row',
'unescaped',
'unescaped'
].forEach(function (name) {

@@ -28,0 +29,0 @@ var js = fs.readFileSync(path.join(mu.root, name + '.js')).toString(),

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