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

jsxon

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsxon - npm Package Compare versions

Comparing version 0.0.9 to 0.0.10

2

bower.json
{
"name": "jsxon",
"version": "0.0.9",
"version": "0.0.10",
"homepage": "https://github.com/re5et/jsxon",

@@ -5,0 +5,0 @@ "authors": [

define(['react'], function(React){
var specialProperties = ['el', 'children', 'text', 'defaultType'];
var specialProperties = ['el', 'children', 'text', 'defaultEl'];
var jsxon = function(obj, defaultType){
var jsxon = function(obj, defaultEl){
defaultType = defaultType || "div";
defaultEl = defaultEl || "div";

@@ -26,11 +26,11 @@ if(obj.className && obj.className.join){

if(obj.defaultType){
defaultType = obj.defaultType;
if(obj.defaultEl){
defaultEl = obj.defaultEl;
}
var elementType = obj.el || obj.defaultType || defaultType;
var elementType = obj.el || obj.defaultEl || defaultEl;
if(obj.text || obj.children){
var children = obj.text || obj.children.map(function(child){
return jsxon(child, defaultType);
return jsxon(child, defaultEl);
});

@@ -37,0 +37,0 @@ }

var React = require('react');
var specialProperties = ['el', 'children', 'text', 'defaultType'];
var specialProperties = ['el', 'children', 'text', 'defaultEl'];
var jsxon = function(obj, defaultType){
var jsxon = function(obj, defaultEl){
defaultType = defaultType || "div";
defaultEl = defaultEl || "div";

@@ -26,11 +26,11 @@ if(obj.className && obj.className.join){

if(obj.defaultType){
defaultType = obj.defaultType;
if(obj.defaultEl){
defaultEl = obj.defaultEl;
}
var elementType = obj.el || obj.defaultType || defaultType;
var elementType = obj.el || obj.defaultEl || defaultEl;
if(obj.text || obj.children){
var children = obj.text || obj.children.map(function(child){
return jsxon(child, defaultType);
return jsxon(child, defaultEl);
});

@@ -37,0 +37,0 @@ }

{
"name": "jsxon",
"version": "0.0.9",
"version": "0.0.10",
"description": "JSX object notation - converts from simple javascript objects to JSX",

@@ -5,0 +5,0 @@ "author": "atom smith <@re5et>",

@@ -20,3 +20,3 @@ # jsxon

return jsxon({
type: 'ul',
el: 'ul',
defaultElement: 'li'

@@ -48,3 +48,3 @@ children: [0,1,2,3,4].map(function(i){

* type: the element type to use (div / ul / li / etc)
* el: the element type to use (div / ul / li / etc)
* text: key to specify text for element (instead of children)

@@ -67,7 +67,7 @@ * children: key to specify the child nodes of an element

return jsxon({
type: 'ol',
el: 'ol',
defaultElement: 'li',
children: lists.sort.map(function(list){
return {
type: 'ul'
el: 'ul'
children: items.map(function(item){

@@ -74,0 +74,0 @@ return {

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