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

remixml

Package Overview
Dependencies
Maintainers
1
Versions
346
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remixml - npm Package Compare versions

Comparing version 1.0.9 to 1.0.10

2

package.json
{
"name": "remixml",
"version": "1.0.9",
"version": "1.0.10",
"description": "XML/HTML-like macro language/template engine",

@@ -5,0 +5,0 @@ "browser": "remixml.js",

@@ -54,13 +54,82 @@ <h1>Remixml</h1>

&amp;scope.variablename:encoding%formatting;
- scope: References the primary level in the variables object (the second
argument to parse()).
- variablename: References second and deeper levels in the variables
object (can contain multiple dots to designate deeper levels, is used
to access both objects and arrays).
- encoding (optional):
Specifies the encoding to be used when substituting the variable.
The encodings available are:
- html (default, encodes using HTML entities).
- uric (URI component, encodes URI arguments in an URL).
- none (no encoding, as is, can be abbreviated as :;).
- formatting (optional):
sprintf()-like formatting specification.
Supported formats: %c, %d, %e, %f, %g, %s, %x.
If the formatting string equals a three-letter currency (all capitals),
the value will be formatted like a currency (including currency symbol)
in the current locale.
### Language statements
Simple assigment:
```html
<set var="_.variablename">the new value</set>
```
Simple calculations:
```html
<set var="_.variablename" expr="_.variablename + 1"></set>
```
Conditionals:
```html
<if expr="_.variablename > 1">
yes
</if>
<elif expr="_.variablename == 'foobar'">
second condition valid
</elif>
<else>
otherwise
</else>
```
Counted loop:
```html
<for from="1" to="42">
This is line &_._recno;<br />
</for>
```
Iterating through an object or array:
```html
<for in="&_.variablename;">
This is line &_._recno;<br />
</for>
```
### API
## Official website
#### Reserved object variables
- $.sys.lang
If set, it overrides the default locale of the browser environment
(currently only used during currency formatting).
## References
Soon to be launched:
- The [Remixml website](http://remixml.org/).
- For historical reference: Remixml was originally inspired by
- For historical reference:<br />
Remixml was originally inspired by
[RXML, the Roxen webserver macro language](http://docs.roxen.com/).

@@ -90,3 +90,3 @@ // RemixML v1.0: XML/HTML-like macro language

} else
j = "";
$._._ok = 0, j = "";
return j;

@@ -306,5 +306,5 @@ }

t._value = e[j];
res.appendChild(newctx([n, sc], t));
res.appendChild(newctx([n, sc], t)); _._ok = 1;
}
n.normalize();
n.normalize(); _._ok = 0;
if (j = gatt("in"))

@@ -349,8 +349,6 @@ if ((e = fvar(j, $)) && e.length >= 0)

if (e = gatt("var")) {
e = insert(e, gatt("quote"), gatt("format"), $);
if ((j = +gatt("offset"))
|| (k = gatt("limit")) != null) {
_._ok = 1; e = insert(e, gatt("quote"), gatt("format"), $);
if ((j = +gatt("offset")) || (k = gatt("limit")) != null)
e = castxt(e).substr(j, +k);
}
if (ret(insert(e, gatt("quote"), gatt("format"), $)))
if (ret(e))
continue;

@@ -461,3 +459,3 @@ break;

W.Remixml = Remixml;
if (typeof define == "function" && define.amd)
if (W.define && define.amd)
define(Remixml);

@@ -464,0 +462,0 @@ if (W.exports)

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