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

@budibase/handlebars-helpers

Package Overview
Dependencies
Maintainers
2
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@budibase/handlebars-helpers - npm Package Compare versions

Comparing version 0.11.11 to 0.12.0

20

index.js

@@ -10,4 +10,2 @@ /*!

var forIn = require('for-in');
var define = require('define-property');
var lib = require('./lib/');

@@ -29,3 +27,3 @@

var hbs = options.handlebars || options.hbs || require('handlebars');
define(module.exports, 'handlebars', hbs);
module.exports.handlebars = hbs;

@@ -37,5 +35,6 @@ if (groups) {

} else {
forIn(lib, function(group, key) {
for (const key in lib) {
const group = lib[key];
hbs.registerHelper(group);
});
}
}

@@ -49,12 +48,13 @@

*/
for (const key in lib) {
const group = lib[key];
forIn(lib, function(group, key) {
define(module.exports, key, function(options) {
module.exports[key] = function(options) {
options = options || {};
var hbs = options.handlebars || options.hbs || require('handlebars');
define(module.exports, 'handlebars', hbs);
module.exports.handlebars = hbs;
hbs.registerHelper(group);
return hbs.helpers;
});
});
};
}

@@ -61,0 +61,0 @@ /**

@@ -5,3 +5,2 @@ 'use strict';

var helpers = module.exports;
const arraySort = require('array-sort');
const getValue = require('get-value');

@@ -646,3 +645,8 @@ const createFrame = require('./utils/createFrame');

}
return arraySort.apply(null, args);
if (typeof prop === 'function') {
return array.sort(prop);
}
return array.sort((a, b) => (a[prop] > b[prop] ? 1 : -1));
}

@@ -649,0 +653,0 @@ return '';

@@ -8,3 +8,2 @@ 'use strict';

var helpers = module.exports;
const kindOf = require('kind-of');
const htmlTag = require('html-tag');

@@ -92,3 +91,3 @@

helpers.js = function(context) {
if (kindOf(context) === 'object') {
if (typeof context === 'object' && context.hash) {
var attr = parseAttr(context.hash);

@@ -98,3 +97,3 @@ return `<script${attr ? ' ' + attr : ''}></script>`;

if (kindOf(context) === 'string') {
if (typeof context === 'string') {
return `<script src="${context}"></script>`;

@@ -101,0 +100,0 @@ }

@@ -23,3 +23,3 @@ 'use strict';

url: require('./url'),
uuid: require('./uuid'),
uuid: require('./uuid')
};

@@ -74,3 +74,3 @@ 'use strict';

helpers.typeOf = require('kind-of');
helpers.typeOf = function(val) { return typeof val; };

@@ -77,0 +77,0 @@ /**

@@ -8,3 +8,2 @@ 'use strict';

const getValue = require('get-value');
const kindOf = require('kind-of');
const getObject = require('get-object');

@@ -188,3 +187,3 @@ const createFrame = require('./utils/createFrame');

helpers.isObject = function(value) {
return kindOf(value) === 'object';
return typeof value === 'object';
};

@@ -191,0 +190,0 @@

'use strict';
const define = require('define-property');
const extend = require('extend-shallow');
module.exports = function createFrame(data) {

@@ -11,8 +8,8 @@ if (typeof(data) !== 'object') {

var frame = extend({}, data);
var frame = Object.assign({}, data);
frame._parent = data;
define(frame, 'extend', function(data) {
extend(this, data);
});
frame.extend = function(data) {
Object.assign(this, data);
};

@@ -19,0 +16,0 @@ if (arguments.length > 1) {

{
"name": "@budibase/handlebars-helpers",
"description": "More than 130 Handlebars helpers in ~20 categories. Helpers can be used with Assemble, Generate, Verb, Ghost, gulp-handlebars, grunt-handlebars, consolidate, or any node.js/Handlebars project.",
"version": "0.11.11",
"version": "0.12.0",
"homepage": "https://github.com/Budibase/handlebars-helpers",

@@ -78,6 +78,2 @@ "author": "Jon Schlinkert (https://github.com/jonschlinkert)",

"dependencies": {
"array-sort": "^1.0.0",
"define-property": "^2.0.2",
"extend-shallow": "^3.0.2",
"for-in": "^1.0.2",
"get-object": "^0.2.0",

@@ -91,3 +87,3 @@ "get-value": "^3.0.1",

"kind-of": "^6.0.3",
"micromatch": "^3.1.5",
"micromatch": "^4.0.5",
"relative": "^3.0.2",

@@ -105,3 +101,2 @@ "striptags": "^3.1.1",

"gulp-unused": "^0.2.1",
"helper-coverage": "^0.1.3",
"is-valid-app": "^0.3.0",

@@ -108,0 +103,0 @@ "js-yaml": "^4.1.0",

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