You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

helper-lib

Package Overview
Dependencies
Maintainers
2
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

helper-lib - npm Package Compare versions

Comparing version
0.2.4
to
0.2.5
+15
-1
lib/helpers/helpers-html.js

@@ -7,7 +7,21 @@ /*! html helpers

module.exports.register = function(Handlebars, options) {
var HTML, Utils, grunt;
var HTML, Utils, grunt, util;
grunt = require('grunt');
util = require('util');
Utils = require('../utils/utils');
HTML = require('../utils/html');
Handlebars.registerHelper("inspect", function(obj, ext) {
var html, md, result;
if (Utils.isUndefined(options.ext)) {
ext = ".html";
} else {
ext = options.ext;
}
md = "``` " + "json" + "\n" + (util.inspect(obj, true, null)) + "\n```";
html = '<pre class="json">' + '\n' + (util.inspect(obj, true, null)) + '\n</pre>';
result = Utils.switchOutput(ext, md, html);
return Utils.safeString(result);
});
Handlebars.registerHelper("_link", function(url, text, linkClass) {

@@ -14,0 +28,0 @@ var html, md, result;

+10
-12

@@ -6,3 +6,3 @@ /*! logging helpers

(function() {
var Utils, debug, expandJSON, expandYAML, grunt, inspect, log, to;
var Utils, debug, expandJSON, expandMapping, expandYAML, grunt, log, to;

@@ -15,12 +15,2 @@ Utils = require('../utils/utils');

module.exports.inspect = inspect = function(obj, language) {
var result;
if (Utils.isUndefined(language)) {
language = "";
}
result = '``` ' + language + '\n' + require('util').inspect(obj, 10, null).replace('{', '{\n ').replace('}', '\n}') + '\n```';
return Utils.safeString(result);
};
module.exports.log = log = function(value) {

@@ -38,2 +28,10 @@ return console.log(value);

module.exports.expandMapping = expandMapping = function(src) {
var list, yml;
list = Utils.expandMapping(src);
yml = to.format.yaml.stringify(list);
return Utils.safeString(yml);
};
module.exports.expandYAML = expandYAML = function(src) {

@@ -56,5 +54,5 @@ var list, yml;

module.exports.register = function(Handlebars, options) {
Handlebars.registerHelper("expandMapping", expandMapping);
Handlebars.registerHelper("expandYAML", expandYAML);
Handlebars.registerHelper("expandJSON", expandJSON);
Handlebars.registerHelper("inspect", inspect);
Handlebars.registerHelper("log", log);

@@ -61,0 +59,0 @@ Handlebars.registerHelper("debug", debug);

{
"name": "helper-lib",
"description": "Extensive collection of Handlebars helpers.",
"version": "0.2.4",
"version": "0.2.5",
"homepage": "https://github.com/assemble/helper-lib",

@@ -6,0 +6,0 @@ "author": {

@@ -1,2 +0,2 @@

# [Helper Library v0.2.4](http://github.com/assemble/helper-lib) [![Build Status](https://travis-ci.org/assemble/helper-lib.png)](https://travis-ci.org/assemble/helper-lib)
# [Helper Library v0.2.5](http://github.com/assemble/helper-lib) [![Build Status](https://travis-ci.org/assemble/helper-lib.png)](https://travis-ci.org/assemble/helper-lib)

@@ -1806,3 +1806,3 @@ > Extensive collection of Handlebars helpers.

_This file was generated using Grunt and [assemble](http://github.com/assemble/assemble) on Sat May 18 2013 00:43:53._
_This file was generated using Grunt and [assemble](http://github.com/assemble/assemble) on Sun May 26 2013 10:24:06._

@@ -1809,0 +1809,0 @@