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

elements-lite

Package Overview
Dependencies
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

elements-lite - npm Package Compare versions

Comparing version 0.3.1 to 0.3.3

coverage/coverage.json

2

lib/json-to-form.js

@@ -66,3 +66,3 @@

El.cache("json-form", El.haml(template), function(args) {
El.cache("json-form", El.tpl(template), function(args) {
var el = this

@@ -69,0 +69,0 @@ , def = args.def || {}

{
"name": "elements-lite",
"version": "0.3.1",
"version": "0.3.3",
"stability": 1,

@@ -14,3 +14,3 @@ "license": "MIT",

],
"main": "elements.js",
"main": "index.js",
"readmeFilename": "README.md",

@@ -35,4 +35,3 @@ "scripts": {

"buildman": {
"dist/elements-min.js": "elements.js",
"dist/haml-min.js": "lib/haml.js",
"dist/index-min.js": "index.js",
"dist/responsive-min.js": "lib/responsive.js"

@@ -39,0 +38,0 @@ },

@@ -9,4 +9,4 @@ [1]: https://secure.travis-ci.org/litejs/elements-lite.png

@version 0.3.1
@date 2014-08-27
@version 0.3.3
@date 2014-09-13
@stability 1 - Experimental

@@ -13,0 +13,0 @@

@@ -8,3 +8,2 @@ global.Event = global.Event || {}

require("../")
require("../lib/haml")

@@ -207,10 +206,10 @@ function getString(node) {

describe( "Haml" ).
it ("supports haml").
equal(getString(El.haml("a\n b\n i")), '<a><b><i></i></b></a>').
equal(getString(El.haml("a \n b\n i")), '<a><b><i></i></b></a>').
equal(getString(El.haml("a\n b\n i link")), '<a><b><i>link</i></b></a>').
equal(getString(El.haml("a\n b \n i link")), '<a><b><i>link</i></b></a>').
equal(getString(El.haml("a\n b\n i link>to")), '<a><b><i>link&gt;to</i></b></a>').
anyOf(getString(El.haml("a[href='#a>b']\n b.bold \n i#ital link")),
describe( "Templates" ).
it ("supports tpl").
equal(getString(El.tpl("a\n b\n i")), '<a><b><i></i></b></a>').
equal(getString(El.tpl("a \n b\n i")), '<a><b><i></i></b></a>').
equal(getString(El.tpl("a\n b\n i link")), '<a><b><i>link</i></b></a>').
equal(getString(El.tpl("a\n b \n i link")), '<a><b><i>link</i></b></a>').
equal(getString(El.tpl("a\n b\n i link>to")), '<a><b><i>link&gt;to</i></b></a>').
anyOf(getString(El.tpl("a[href='#a>b']\n b.bold \n i#ital link")),
[ '<a href="#a>b"><b class=bold><i id=ital>link</i></b></a>'

@@ -223,8 +222,8 @@ , '<a href="#a>b"><b class="bold"><i id="ital">link</i></b></a>'

it ("supports block expansion").
equal(getString(El.haml("a>b>i")), '<a><b><i></i></b></a>').
equal(getString(El.haml("a > b>i")), '<a><b><i></i></b></a>').
equal(getString(El.haml("a>b>i link")), '<a><b><i>link</i></b></a>').
equal(getString(El.haml("a>b > i link")), '<a><b><i>link</i></b></a>').
equal(getString(El.haml("a>b>i link>to")), '<a><b><i>link&gt;to</i></b></a>').
anyOf(getString(El.haml("a[href='#a>b']>b.bold > i#ital link")),
equal(getString(El.tpl("a>b>i")), '<a><b><i></i></b></a>').
equal(getString(El.tpl("a > b>i")), '<a><b><i></i></b></a>').
equal(getString(El.tpl("a>b>i link")), '<a><b><i>link</i></b></a>').
equal(getString(El.tpl("a>b > i link")), '<a><b><i>link</i></b></a>').
equal(getString(El.tpl("a>b>i link>to")), '<a><b><i>link&gt;to</i></b></a>').
anyOf(getString(El.tpl("a[href='#a>b']>b.bold > i#ital link")),
[ '<a href="#a>b"><b class=bold><i id=ital>link</i></b></a>'

@@ -237,11 +236,11 @@ , '<a href="#a>b"><b class="bold"><i id="ital">link</i></b></a>'

it ("supports templates").
anyOf(getString(El.haml(":template t1\n .temp1 t123\nt1")),
anyOf(getString(El.tpl(":template t1\n .temp1 t123\nt1")),
[ '<div class=temp1>t123</div>'
, '<div class="temp1">t123</div>'
]).
anyOf(getString(El.haml(":template t2\n .temp2>b t123\nt2")),
anyOf(getString(El.tpl(":template t2\n .temp2>b t123\nt2")),
[ '<div class=temp2><b>t123</b></div>'
, '<div class="temp2"><b>t123</b></div>'
]).
anyOf(getString(El.haml(":template t3\n .temp3\n b t123\nt3")),
anyOf(getString(El.tpl(":template t3\n .temp3\n b t123\nt3")),
[ '<div class=temp3><b>t123</b></div>'

@@ -252,3 +251,3 @@ , '<div class="temp3"><b>t123</b></div>'

it ( "should render data to elements" ).
equal(getString(t1 = El.haml("a>b[data-bind=\"class:'red','i>1'\"]>i =txt:'hello {name}'")), "<a><b data-bind=\"class:'red','i>1'\"><i data-bind=\"txt:'hello {name}'\"></i></b></a>").
equal(getString(t1 = El.tpl("a>b[data-bind=\"class:'red','i>1'\"]>i =txt:'hello {name}'")), "<a><b data-bind=\"class:'red','i>1'\"><i data-bind=\"txt:'hello {name}'\"></i></b></a>").
equal(getString(t1.render({i:1,name:"world"})), "<a><b data-bind=\"class:'red','i>1'\"><i data-bind=\"txt:'hello {name}'\">hello world</i></b></a>").

@@ -258,3 +257,3 @@ equal(getString(t1.render({i:2,name:"moon"})), "<a><b data-bind=\"class:'red','i>1'\" class=\"red\"><i data-bind=\"txt:'hello {name}'\">hello moon</i></b></a>").

it ( "should show set DOM propperty when plugin not found" ).
equal(getString(t1 = El.haml("a =unknown_plugin:\'hello {name}\'")), '<a data-bind="unknown_plugin:\'hello {name}\'"></a>').
equal(getString(t1 = El.tpl("a =unknown_plugin:\'hello {name}\'")), '<a data-bind="unknown_plugin:\'hello {name}\'"></a>').
equal(getString(t1.render({name:"world"})), '<a data-bind="unknown_plugin:\'hello {name}\'" unknown_plugin="hello world"></a>').

@@ -261,0 +260,0 @@ equal(getString(t1.render({name:"moon"})), '<a data-bind="unknown_plugin:\'hello {name}\'" unknown_plugin="hello moon"></a>').

var dom = require("dom-lite")
dom.document.querySelector = dom.document.querySelectorAll = null

@@ -9,5 +10,4 @@ global.document = dom.document

global.document.querySelector = global.document.querySelectorAll = null
require("./run-browser.js")
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