User Tools

Site Tools


cookbooks:5.5.x:transformations

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Last revisionBoth sides next revision
cookbooks:5.5.x:transformations [2021/04/27 07:38] – created micondacookbooks:5.5.x:transformations [2021/11/17 16:26] – [{urialias.decode}] miconda
Line 852: Line 852:
 </code> </code>
  
 +===== Value Transformations  =====
 +
 +Exported by **pv** module.
 +
 +==== {val.json} ====
 +
 +If value is $null, return empty string; if value is string, then it is escaped for use as json value (without surrounding quotes.
 +
 +<code c>
 +$var(x) = '"name" <sip:name@a.com>';
 +$(var(x){val.json}) => \"name\" <sip:name@a.com>
 +</code>
 +
 +==== {val.n0} ====
 +
 +Return integer 0 for values that are $null.
 +
 +<code c>
 +$sht(a=>x) = $null;
 +$(sht(a=>x){val.n0}) => 0
 +</code>
cookbooks/5.5.x/transformations.txt · Last modified: 2021/12/07 07:55 by miconda

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki