Socket
Socket
Sign inDemoInstall

sonic-forest

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

sonic-forest - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

4

lib/print/printBinary.d.ts

@@ -1,3 +0,1 @@

type Child = (tab: string) => string;
export declare const printBinary: (tab: string | undefined, children: [left?: null | Child, right?: null | Child]) => string;
export {};
export * from 'tree-dump/lib/printBinary';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.printBinary = void 0;
const printBinary = (tab = '', children) => {
const [left, right] = children;
let str = '';
if (left)
str += `\n${tab}← ${left(tab + ' ')}`;
if (right)
str += `\n${tab}→ ${right(tab + ' ')}`;
return str;
};
exports.printBinary = printBinary;
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("tree-dump/lib/printBinary"), exports);

@@ -1,3 +0,1 @@

type Child = (tab: string) => string;
export declare const printTree: (tab: string | undefined, children: (Child | null)[]) => string;
export {};
export * from 'tree-dump/lib/printTree';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.printTree = void 0;
const printTree = (tab = '', children) => {
children = children.filter(Boolean);
let str = '';
for (let i = 0; i < children.length; i++) {
const isLast = i >= children.length - 1;
const fn = children[i];
if (!fn)
continue;
const child = fn(tab + `${isLast ? ' ' : '│'} `);
const branch = child ? (isLast ? '└─' : '├─') : '│ ';
str += `\n${tab}${branch} ${child}`;
}
return str;
};
exports.printTree = printTree;
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("tree-dump/lib/printTree"), exports);

@@ -1,3 +0,1 @@

export interface Printable {
toString(tab?: string): string;
}
export type * from 'tree-dump/lib/types';

@@ -7,3 +7,3 @@ {

},
"version": "1.0.1",
"version": "1.0.2",
"description": "High-performance (binary) tree and sorted map implementation (AVL, Splay, Radix, Red-Black)",

@@ -62,3 +62,5 @@ "author": {

},
"dependencies": {},
"dependencies": {
"tree-dump": "^1.0.0"
},
"devDependencies": {

@@ -65,0 +67,0 @@ "@types/benchmark": "^2.1.2",

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