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

derw

Package Overview
Dependencies
Maintainers
1
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

derw - npm Package Compare versions

Comparing version 0.0.3-18 to 0.0.3-19

2

package.json
{
"name": "derw",
"version": "0.0.3-18",
"version": "0.0.3-19",
"description": "An Elm-inspired language that transpiles to TypeScript",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -274,4 +274,10 @@ import {

case "FixedType": {
if (type_.name === "List") {
return generateType(type_);
if (
type_.args.length > 0 &&
type_.args[0].kind === "FixedType" &&
type_.args[0].args.length > 0
) {
return `${type_.name} (${type_.args
.map(generateTopLevelType)
.join(" ")})`;
}

@@ -577,5 +583,5 @@

case "FunctionArg":
return generateType(arg.type);
return generateTopLevelType(arg.type);
case "AnonFunctionArg":
return generateType(arg.type);
return generateTopLevelType(arg.type);
}

@@ -670,6 +676,18 @@ })

export function generateDerw(module: Module): string {
return module.body
.map(generateBlock)
.filter((line) => line.length > 0)
.join("\n\n");
const importBlocks = module.body.filter((block) => block.kind === "Import");
const nonImportBlocks = module.body.filter(
(block) => block.kind !== "Import"
);
return [
...importBlocks
.map(generateBlock)
.filter((line) => line.length > 0)
.join("\n"),
importBlocks.length > 0 ? "\n\n" : "",
...nonImportBlocks
.map(generateBlock)
.filter((line) => line.length > 0)
.join("\n\n"),
].join("");
}

@@ -264,4 +264,10 @@ import {

case "FixedType": {
if (type_.name === "List") {
return generateType(type_);
if (
type_.args.length > 0 &&
type_.args[0].kind === "FixedType" &&
type_.args[0].args.length > 0
) {
return `${type_.name} (${type_.args
.map(generateTopLevelType)
.join(" ")})`;
}

@@ -571,5 +577,5 @@

case "FunctionArg":
return generateType(arg.type);
return generateTopLevelType(arg.type);
case "AnonFunctionArg":
return generateType(arg.type);
return generateTopLevelType(arg.type);
}

@@ -576,0 +582,0 @@ })

Sorry, the diff of this file is too big to display

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