Socket
Socket
Sign inDemoInstall

@basketry/sorbet

Package Overview
Dependencies
3
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.3 to 0.0.4

9

lib/interface-factory.js

@@ -105,3 +105,3 @@ "use strict";

*buildSignatureParameters(method) {
yield* indent(method.parameters.map((param, i) => {
yield* indent(sortParameters(method.parameters).map((param, i) => {
const comma = i === method.parameters.length - 1 ? '' : ',';

@@ -121,4 +121,4 @@ const typeName = (0, name_factory_1.buildTypeName)({

const parameters = method.parameters.length
? `(${method.parameters
.map((param) => `${(0, name_factory_1.buildParameterName)(param)}:`)
? `(${sortParameters(method.parameters)
.map((param) => `${(0, name_factory_1.buildParameterName)(param)}:${(0, basketry_1.isRequired)(param) ? '' : ' nil'}`)
.join(', ')})`

@@ -193,2 +193,5 @@ : '';

}
function sortParameters(parameters) {
return [...parameters].sort((a, b) => ((0, basketry_1.isRequired)(a) ? 0 : 1) - ((0, basketry_1.isRequired)(b) ? 0 : 1));
}
function from(lines) {

@@ -195,0 +198,0 @@ return Array.from(lines).join('\n');

{
"name": "@basketry/sorbet",
"version": "0.0.3",
"version": "0.0.4",
"description": "Basketry generator for generating Sorbet types and interfaces",

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

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc