From 0492eba15c7339cf87fc26f59f75bc68fba5048f Mon Sep 17 00:00:00 2001 From: Seth Kinast Date: Wed, 19 Nov 2014 16:54:21 -0800 Subject: [PATCH] Release v1.5.0 --- archive/dustjs-helpers-1.5.0.tar.gz | Bin 0 -> 8160 bytes archive/dustjs-helpers-1.5.0.zip | Bin 0 -> 8817 bytes dist/dust-helpers.js | 80 ++++++++++++++++------------ dist/dust-helpers.min.js | 4 +- package.json | 2 +- 5 files changed, 49 insertions(+), 37 deletions(-) create mode 100644 archive/dustjs-helpers-1.5.0.tar.gz create mode 100644 archive/dustjs-helpers-1.5.0.zip diff --git a/archive/dustjs-helpers-1.5.0.tar.gz b/archive/dustjs-helpers-1.5.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..2ee9f5e9c7a455560f2db301803261b774fa5614 GIT binary patch literal 8160 zcmV<6A0OZ!iwFP!000041MOY^QyWLJ&(Hi7W91!4u$F|KI8`_bAvV5nvB3p6d8s&e zwUSoS8cC~YB|ALK|NcIo?wDE8yQjNn)SaiZH|hOBG@L}! z^!|4J%X+iX#Y6w7{wDqG5B@aq^XSnRpYb<-7Jh%(eDv^(&$b_Y@$lh;hhIMW>d|M- z?XSN0YWp+S{Db4(s5_<_PJz-iNoLn|_|SWuTRyq#VEu*OH8$@#vOAXnci+7gF<9Gl zgV}77?lcz!oO7{=qXs2h((Nb+82{3My2Pvibz=Bk~Vd(hne!tD*Cvosuc zqpABT9uDJhls|kCkdFKaq|H|K2A$9#|rU=BnYT=c1{YBsZiUw{P&F0hbV|NLJIIU{ssf_~? zxp(1o3>xgXiraG93x8BxoVt8C2PU|8V1a8#fHz9sg8m?2hUL`MG%oFaA_3XLVg|)o8?S%bYJi88O0A4tKH(A(!H3y&9)WRdYZ)`*^aO&~nN>T(ja)z_su?8=sOqi-+;- z+>N5yAn8JuX35EH3LaK#F8XaA11N@bJy6+Wo91}GNt5w2$bU4go<-+@4(8>^RhJR- zFe=)}xkh7_xKVf(xsn>2|SiFhuF2c-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dPN{ElQ=6WqlX zrvn@T#%h2~>sLa^H?1p44cx9Ku$DVcdAU#z%fSnBBb1Qdzl_n>jMxV6!;QI>!Hg z-<=#iJH?kr?Yn~$_wxAY$AhQ)PhDm21fLPN{psNJ`=eK<4lR!N4o`n}N6*~e;m_`e zgTtqR+yC#E$NMKI?&x^!;Kj@52m5$-aQNi;tEUHte|O)Z-{H}zdwziL4g=8BBgX*^ z)WJUbJ##PikDq)G$a~)%JU=-7IaqskaC%6X&yJ4Wo_o1>e0uQY)$_e$_wv>8%cGNh z4F42h5Apq9#~5Y*#s1-G9i!rz+y4e{{#5A599iATJBMwg<9iL`he>ynX58U4I!3hcS?D*(KutsvC2cQE8`W@~o6p~s9 zlyL-2NU&F!w8zCg-QRl-SYXd#iGB6kXq3CQcNDmzz#RqdC~!xCI|}^ODe%9QNq~I- GcmM!iDY|?B literal 0 HcmV?d00001 diff --git a/archive/dustjs-helpers-1.5.0.zip b/archive/dustjs-helpers-1.5.0.zip new file mode 100644 index 0000000000000000000000000000000000000000..aae0756f60562be787ea0391c36e2e837a166bc5 GIT binary patch literal 8817 zcma)ibxa*zv+cnT6nA%bmjeZgOL2$dc5rvMV#VEETHFf^<38$s{w$+LKY1hk?Zg0RLqp-(4gD{|4%Roz2`_T&-PLz~;7&=FToG9IQO7 z>}>x8|4)e3+U4wl zDUBxlwz0e?+YSA5fj2Chy~LL@zP~T;^P_(|EPwZ-JU!;$jWu*Id8~@U{HU<>X*(FJ zkrz?07I|UK2(HFz#p87ka5zUhF8=nYiy?CmvcTeXi`VhNg!_BuZx(03esv)FFyXDi zqOehdpwbAj5WoB9hrT1V$D)Io5uOzRU{8)Xto=5WgGP4HhmjF92(Sv_lF6NldP)V| zey@JG;S=dRK1(8NdmAluox=^v?6Z6H&8Zer??cnyd;5HA>6@Edx+9vFN78wVh*2Tz zFhrQ*pF^W2g5UM_G>p%AdUp?57tcN8oZ#nv2LQGY$v^oc%*D~20Hbh<~n zRq-9sEZa>xI;>nye>?QpOTo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u+n9Z?P=~ZHjQ>)T@7dR_mM{Aje_R=k<%;$0aOtwaw~}KrYI6ybkw0bInn1xCkf$ zOW%TA>FYIS)dw*B%C6N$+H|cIHzHFiXD9?ww9tc%k#uJmknA(}J&C=TG)g29+__DU zO9I>V5sscGFiTa^M~mmzjeT%?n>Rm3`caZp zsGOzQjiBgA5yGztio&>Hd`rn73%jtavI`l$#iNpc{Al-W{o_X?wbZ9b{z<*=Mr{il ztHT+X&|S&?uN?+>H0KMKsmuFCOR{DuyIZj?o0AbU$dvOf${pHBDn(hse;>PF(cR4KVd42B>q~vSsEcK0;+{!*OWl0$ zFf=`NAo@)hhvOJBO4d>Qse!j+44g2Er~g6WRw@LU8sqZy zxIVX*OigXj55L{cGI(f0%@YHMvAx6mqY37FK---N0Kg^I|4S1P|96_;tE{-BqMD?> zik`y?Ikx|S7V+KBl*;Oro%IL>LheEBbna2AI@vL)uV$Bp?=K|T#cFgq_55iU?#==J zWM_48my5zZEon7uqB&0_w^JDy%?kn*N1Jx0k4vT=3s6U&_yn!l}UEgt$$!Qw-Wi@%F>%O-BR}?1pZP=hTxsD1+iS z{SkE`0}xlocR97nOPXtuI02SE4FtoVv;1CMd|~JXixJypv2)gnpOms%{cg$myhJ3f zn-x+F_d=P?sG+TNenBUCSQMS8|8q*+K(%usKi}p#b50gLf>M?c@+;&lszi0W=y5M9nsI4J zvV>Zg%avh%@Hmx^8HUj-30g<4ZbBvsiw~XTi(`$6RxhkttQKT$^d-?0Ag&Qq3$ga79>%)jjVU*3x1pWA-`9;b78 literal 0 HcmV?d00001 diff --git a/dist/dust-helpers.js b/dist/dust-helpers.js index c6d9e7e..aef2cfe 100644 --- a/dist/dust-helpers.js +++ b/dist/dust-helpers.js @@ -1,10 +1,21 @@ -/*! dustjs-helpers - v1.4.0 +/*! dustjs-helpers - v1.5.0 * https://github.com/linkedin/dustjs-helpers * Copyright (c) 2014 Aleksander Williams; Released under the MIT License */ (function(dust){ -//using the built in logging method of dust when accessible -var _log = dust.log ? function(mssg) { dust.log(mssg, "INFO"); } : function() {}; +// Use dust's built-in logging when available +var _log = dust.log ? function(msg, level) { + level = level || "INFO"; + dust.log(msg, level); +} : function() {}; + +var _deprecatedCache = {}; +function _deprecated(target) { + if(_deprecatedCache[target]) { return; } + _log("Deprecation warning: " + target + " is deprecated and will be removed in a future version of dustjs-helpers", "WARN"); + _log("For help and a deprecation timeline, see https://github.com/linkedin/dustjs-helpers/wiki/Deprecated-Features#" + target.replace(/\W+/g, ""), "WARN"); + _deprecatedCache[target] = true; +} function isSelect(context) { var value = context.current(); @@ -36,18 +47,17 @@ function filter(chunk, context, bodies, params, filterOp) { actualKey, expectedValue, filterOpType = params.filterOpType || ''; + // when @eq, @lt etc are used as standalone helpers, key is required and hence check for defined - if ( typeof params.key !== "undefined") { + if (params.hasOwnProperty("key")) { actualKey = dust.helpers.tap(params.key, chunk, context); - } - else if (isSelect(context)) { + } else if (isSelect(context)) { actualKey = context.current().selectKey; // supports only one of the blocks in the select to be selected if (context.current().isResolved) { filterOp = function() { return false; }; } - } - else { + } else { _log("No key specified for filter in:" + filterOpType + " helper "); return chunk; } @@ -60,27 +70,24 @@ function filter(chunk, context, bodies, params, filterOp) { // we want helpers without bodies to fail gracefully so check it first if(body) { return chunk.render(body, context); - } - else { - _log("No key specified for filter in:" + filterOpType + " helper "); + } else { + _log("No body specified for " + filterOpType + " helper "); return chunk; } - } - else if (bodies['else']) { + } else if (bodies['else']) { return chunk.render(bodies['else'], context); } return chunk; } -function coerce (value, type, context) { - if (value) { - switch (type || typeof(value)) { +function coerce(value, type, context) { + if (typeof value !== "undefined") { + switch (type || typeof value) { case 'number': return +value; case 'string': return String(value); - case 'boolean': { + case 'boolean': value = (value === 'false' ? false : value); return Boolean(value); - } case 'date': return new Date(value); case 'context': return context.get(value); } @@ -143,22 +150,23 @@ var helpers = { if (context.stack.index === context.stack.of - 1) { return chunk; } - if(body) { - return bodies.block(chunk, context); - } - else { - return chunk; + if (body) { + return body(chunk, context); + } else { + return chunk; } }, "idx": function(chunk, context, bodies) { var body = bodies.block; - if(body) { - return bodies.block(chunk, context.push(context.stack.index)); - } - else { - return chunk; - } + // Will be removed in 1.6 + _deprecated("{@idx}"); + if(body) { + return body(chunk, context.push(context.stack.index)); + } + else { + return chunk; + } }, /** @@ -208,12 +216,16 @@ var helpers = { cond argument should evaluate to a valid javascript expression **/ - "if": function( chunk, context, bodies, params ){ + "if": function( chunk, context, bodies, params ) { var body = bodies.block, - skip = bodies['else']; - if( params && params.cond){ - var cond = params.cond; - cond = dust.helpers.tap(cond, chunk, context); + skip = bodies['else'], + cond; + + if(params && params.cond) { + // Will be removed in 1.6 + _deprecated("{@if}"); + + cond = dust.helpers.tap(params.cond, chunk, context); // eval expressions with given dust references if(eval(cond)){ if(body) { diff --git a/dist/dust-helpers.min.js b/dist/dust-helpers.min.js index 3bc4b70..8fd292a 100644 --- a/dist/dust-helpers.min.js +++ b/dist/dust-helpers.min.js @@ -1,4 +1,4 @@ -/*! dustjs-helpers - v1.4.0 +/*! dustjs-helpers - v1.5.0 * https://github.com/linkedin/dustjs-helpers * Copyright (c) 2014 Aleksander Williams; Released under the MIT License */ -!function(dust){function isSelect(a){var b=a.current();return"object"==typeof b&&b.isSelect===!0}function jsonFilter(a,b){return"function"==typeof b?b.toString().replace(/(^\s+|\s+$)/gm,"").replace(/\n/gm,"").replace(/,\s*/gm,", ").replace(/\)\{/gm,") {"):b}function filter(a,b,c,d,e){d=d||{};var f,g,h=c.block,i=d.filterOpType||"";if("undefined"!=typeof d.key)f=dust.helpers.tap(d.key,a,b);else{if(!isSelect(b))return _log("No key specified for filter in:"+i+" helper "),a;f=b.current().selectKey,b.current().isResolved&&(e=function(){return!1})}return g=dust.helpers.tap(d.value,a,b),e(coerce(g,d.type,b),coerce(f,d.type,b))?(isSelect(b)&&(b.current().isResolved=!0),h?a.render(h,b):(_log("No key specified for filter in:"+i+" helper "),a)):c["else"]?a.render(c["else"],b):a}function coerce(a,b,c){if(a)switch(b||typeof a){case"number":return+a;case"string":return String(a);case"boolean":return a="false"===a?!1:a,Boolean(a);case"date":return new Date(a);case"context":return c.get(a)}return a}var _log=dust.log?function(a){dust.log(a,"INFO")}:function(){},helpers={tap:function(a,b,c){if("function"!=typeof a)return a;var d,e="";return d=b.tap(function(a){return e+=a,""}).render(a,c),b.untap(),d.constructor!==b.constructor?d:""===e?!1:e},sep:function(a,b,c){var d=c.block;return b.stack.index===b.stack.of-1?a:d?c.block(a,b):a},idx:function(a,b,c){var d=c.block;return d?c.block(a,b.push(b.stack.index)):a},contextDump:function(a,b,c,d){var e,f=d||{},g=f.to||"output",h=f.key||"current";return g=dust.helpers.tap(g,a,b),h=dust.helpers.tap(h,a,b),e="full"===h?JSON.stringify(b.stack,jsonFilter,2):JSON.stringify(b.stack.head,jsonFilter,2),"console"===g?(_log(e),a):(e=e.replace(/b})):a},lte:function(a,b,c,d){return d?(d.filterOpType="lte",filter(a,b,c,d,function(a,b){return a>=b})):a},gt:function(a,b,c,d){return d?(d.filterOpType="gt",filter(a,b,c,d,function(a,b){return b>a})):a},gte:function(a,b,c,d){return d?(d.filterOpType="gte",filter(a,b,c,d,function(a,b){return b>=a})):a},"default":function(a,b,c,d){return d&&(d.filterOpType="default"),filter(a,b,c,d,function(){return!0})},size:function(a,b,c,d){var e,f,g,h=0;if(d=d||{},e=d.key,e&&e!==!0)if(dust.isArray(e))h=e.length;else if(!isNaN(parseFloat(e))&&isFinite(e))h=e;else if("object"==typeof e){f=0;for(g in e)Object.hasOwnProperty.call(e,g)&&f++;h=f}else h=(e+"").length;else h=0;return a.write(h)}};for(var key in helpers)dust.helpers[key]=helpers[key];"undefined"!=typeof exports&&(module.exports=dust)}("undefined"!=typeof exports?require("dustjs-linkedin"):dust); \ No newline at end of file +!function(dust){function _deprecated(a){_deprecatedCache[a]||(_log("Deprecation warning: "+a+" is deprecated and will be removed in a future version of dustjs-helpers","WARN"),_log("For help and a deprecation timeline, see https://github.com/linkedin/dustjs-helpers/wiki/Deprecated-Features#"+a.replace(/\W+/g,""),"WARN"),_deprecatedCache[a]=!0)}function isSelect(a){var b=a.current();return"object"==typeof b&&b.isSelect===!0}function jsonFilter(a,b){return"function"==typeof b?b.toString().replace(/(^\s+|\s+$)/gm,"").replace(/\n/gm,"").replace(/,\s*/gm,", ").replace(/\)\{/gm,") {"):b}function filter(a,b,c,d,e){d=d||{};var f,g,h=c.block,i=d.filterOpType||"";if(d.hasOwnProperty("key"))f=dust.helpers.tap(d.key,a,b);else{if(!isSelect(b))return _log("No key specified for filter in:"+i+" helper "),a;f=b.current().selectKey,b.current().isResolved&&(e=function(){return!1})}return g=dust.helpers.tap(d.value,a,b),e(coerce(g,d.type,b),coerce(f,d.type,b))?(isSelect(b)&&(b.current().isResolved=!0),h?a.render(h,b):(_log("No body specified for "+i+" helper "),a)):c["else"]?a.render(c["else"],b):a}function coerce(a,b,c){if("undefined"!=typeof a)switch(b||typeof a){case"number":return+a;case"string":return String(a);case"boolean":return a="false"===a?!1:a,Boolean(a);case"date":return new Date(a);case"context":return c.get(a)}return a}var _log=dust.log?function(a,b){b=b||"INFO",dust.log(a,b)}:function(){},_deprecatedCache={},helpers={tap:function(a,b,c){if("function"!=typeof a)return a;var d,e="";return d=b.tap(function(a){return e+=a,""}).render(a,c),b.untap(),d.constructor!==b.constructor?d:""===e?!1:e},sep:function(a,b,c){var d=c.block;return b.stack.index===b.stack.of-1?a:d?d(a,b):a},idx:function(a,b,c){var d=c.block;return _deprecated("{@idx}"),d?d(a,b.push(b.stack.index)):a},contextDump:function(a,b,c,d){var e,f=d||{},g=f.to||"output",h=f.key||"current";return g=dust.helpers.tap(g,a,b),h=dust.helpers.tap(h,a,b),e="full"===h?JSON.stringify(b.stack,jsonFilter,2):JSON.stringify(b.stack.head,jsonFilter,2),"console"===g?(_log(e),a):(e=e.replace(/b})):a},lte:function(a,b,c,d){return d?(d.filterOpType="lte",filter(a,b,c,d,function(a,b){return a>=b})):a},gt:function(a,b,c,d){return d?(d.filterOpType="gt",filter(a,b,c,d,function(a,b){return b>a})):a},gte:function(a,b,c,d){return d?(d.filterOpType="gte",filter(a,b,c,d,function(a,b){return b>=a})):a},"default":function(a,b,c,d){return d&&(d.filterOpType="default"),filter(a,b,c,d,function(){return!0})},size:function(a,b,c,d){var e,f,g,h=0;if(d=d||{},e=d.key,e&&e!==!0)if(dust.isArray(e))h=e.length;else if(!isNaN(parseFloat(e))&&isFinite(e))h=e;else if("object"==typeof e){f=0;for(g in e)Object.hasOwnProperty.call(e,g)&&f++;h=f}else h=(e+"").length;else h=0;return a.write(h)}};for(var key in helpers)dust.helpers[key]=helpers[key];"undefined"!=typeof exports&&(module.exports=dust)}("undefined"!=typeof exports?require("dustjs-linkedin"):dust); \ No newline at end of file diff --git a/package.json b/package.json index c076592..e141c84 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dustjs-helpers", - "version": "1.4.0", + "version": "1.5.0", "author": { "name": "Aleksander Williams", "url": "http://akdubya.github.com/dustjs"