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

ludi

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ludi - npm Package Compare versions

Comparing version 0.0.4 to 0.0.6

2

package.json
{
"name": "ludi",
"version": "0.0.4",
"version": "0.0.6",
"author": "John Susek <ludi@johnsolo.net>",

@@ -5,0 +5,0 @@ "bin": "./driver.mjs",

@@ -79,2 +79,8 @@ import { capitalize, camelCase, deindent, addSlashes, cleanIndent, stripQuotes } from './util.js';

// Special case for Scene
if (tag === 'h2d.Scene' && instance === 's2d') {
let params = heaps.constructorParams(tag);
values = args(params, props, tag);
}
// Direct assignment e.g.

@@ -84,3 +90,3 @@ // <Tile name="tile" :value="new Tile()">

// tile = new Tile()
if (props.value) {
else if (props.value) {
let value = props.value;

@@ -97,17 +103,19 @@ if (!value.startsWith('[')) value = addSlashes(value)

// tile = Tile.fromColor(0xFFFFFF)
let staticConstructor = heaps.findStaticConstructor(props, tag);
if (staticConstructor) {
let params = heaps.staticParams(tag, staticConstructor);
values = args(params, props, staticConstructor);
code += `${instance} = ${tag}.${camelCase(staticConstructor)}(${values.values});\n`;
}
// Create from constructor e.g.
// <Bitmap name="bmp" :tile="mytile">
// ->
// bmp = new Bitmap(mytile)
else {
let constructor = tag;
let params = heaps.constructorParams(constructor);
values = args(params, props, constructor);
code += `${instance} = new ${constructor}(${values.values});\n`;
let staticConstructor = heaps.findStaticConstructor(props, tag);
if (staticConstructor) {
let params = heaps.staticParams(tag, staticConstructor);
values = args(params, props, staticConstructor);
code += `${instance} = ${tag}.${camelCase(staticConstructor)}(${values.values});\n`;
}
// Create from constructor e.g.
// <Bitmap name="bmp" :tile="mytile">
// ->
// bmp = new Bitmap(mytile)
else {
let params = heaps.constructorParams(tag);
values = args(params, props, tag);
code += `${instance} = new ${tag}(${values.values});\n`;
}
}

@@ -114,0 +122,0 @@

@@ -21,2 +21,4 @@ import * as hxgen from './hxgen';

if (!name && tag === 'Scene') name = 's2d';
if (name) {

@@ -27,5 +29,2 @@ let klass = `${ns}.${tag}`;

}
else if (tag === 'Scene') {
name = 's2d';
}
else if (!['App', 'Window'].includes(tag)) {

@@ -37,3 +36,3 @@ throw Error(`Missing required property 'name' on '${tag}'`);

if (tag === 'Window') {
if (['App', 'Window'].includes(tag) && props) {
for (let prop of Object.entries(props)) {

@@ -40,0 +39,0 @@ code.body += hxgen.handler(klass)(prop);

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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