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

treetrunks

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

treetrunks - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

11

dist/treetrunks.js

@@ -10,2 +10,3 @@ // src/treetrunks.ts

let currentTreeNode = tree;
console.log(maybePath);
for (const segment of maybePath) {

@@ -18,5 +19,11 @@ if (currentTreeNode === null) {

}
if (segment in currentTreeNode[1]) {
currentTreeNode = currentTreeNode[1][segment];
const subPaths = currentTreeNode[1];
if (segment in subPaths) {
currentTreeNode = subPaths[segment];
} else {
const wildcard = Object.keys(subPaths).find((key) => key.startsWith(`\$`));
if (wildcard) {
currentTreeNode = subPaths[wildcard];
continue;
}
return false;

@@ -23,0 +30,0 @@ }

2

package.json
{
"name": "treetrunks",
"version": "0.0.1",
"version": "0.0.2",
"license": "MIT",

@@ -5,0 +5,0 @@ "author": {

@@ -68,2 +68,3 @@ export function required<T>(arg: T): [`required`, T] {

let currentTreeNode: Tree | null = tree
console.log(maybePath)
for (const segment of maybePath) {

@@ -76,5 +77,11 @@ if (currentTreeNode === null) {

}
if (segment in currentTreeNode[1]) {
currentTreeNode = currentTreeNode[1][segment]
const subPaths = currentTreeNode[1]
if (segment in subPaths) {
currentTreeNode = subPaths[segment]
} else {
const wildcard = Object.keys(subPaths).find((key) => key.startsWith(`$`))
if (wildcard) {
currentTreeNode = subPaths[wildcard]
continue
}
return false

@@ -81,0 +88,0 @@ }

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