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

comline

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

comline - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

32

dist/cli.js

@@ -238,8 +238,27 @@ // src/cli.ts

}
var myTree = required({
hello: optional({
world: null,
$name: optional({ good: required({ morning: null }) })
})
});
function isTreePath(tree, maybePath) {
let currentTreeNode = tree;
for (const segment of maybePath) {
if (currentTreeNode === null) {
return false;
}
if (typeof segment !== `string`) {
return false;
}
if (segment in currentTreeNode[1]) {
currentTreeNode = currentTreeNode[1][segment];
} else {
return false;
}
}
if (currentTreeNode === null) {
return true;
}
switch (currentTreeNode[0]) {
case `required`:
return false;
case `optional`:
return true;
}
}

@@ -346,4 +365,5 @@ // src/cli.ts

optional,
isTreePath,
encapsulate,
cli
};

4

package.json
{
"name": "comline",
"version": "0.1.2",
"version": "0.1.3",
"license": "MIT",

@@ -22,3 +22,3 @@ "author": {

"zod-to-json-schema": "3.23.3",
"treetrunks": "0.0.0"
"treetrunks": "0.0.1"
},

@@ -25,0 +25,0 @@ "devDependencies": {

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