
Product
Introducing Rust Support in Socket
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.
Displays a tree structure in the console, supporting both binary trees and trees with an arbitrary number of children.
Displays a tree structure in the console, supporting both binary trees and trees with an arbitrary number of children.
To install the package, use npm:
pnpm add deep-print
yarn install deep-print
npm install deep-print
// Deep Print
import React from "react";
import { dp } from "deep-print";
const str = 'start' + dp('', [
(tab) => 'line 1',
(tab) => 'line 2' + dp(tab, [
(tab) => 'line 2.1',
(tab) => 'line 2.2',
])
(tab) => 'line 3',
]);
console.log(str);
// start
// ├── line 1
// │
// ├── line 2
// │ ├── line 2.1
// │ └── line 2.2
// └── line 3
// Deep Print Binary
import React from "react";
import { dpd } from "deep-print";
const str =
"Node" +
dpd("", [
(tab) => "left" + printBinary(tab, [() => "left 1", () => "right 1"]),
(tab) => "right" + printBinary(tab, [() => "left 2", () => "right 2"]),
]);
console.log(str);
// Node
// ← left
// ← left 1
// → right 1
// → right
// ← left 2
// → right 2
Bundle your TypeScript library with no config, powered by esbuild.
# pnpm
$ pnpm install
# yarn
$ yarn install
# npm
$ npm install
src
src/index.ts
src
.
Once the command works properly, you will see dist
folder.# pnpm
$ pnpm run build
# yarn
$ yarn run build
# npm
$ npm run build
$ npm publish
FAQs
Displays a tree structure in the console, supporting both binary trees and trees with an arbitrary number of children.
The npm package deep-print receives a total of 1 weekly downloads. As such, deep-print popularity was classified as not popular.
We found that deep-print demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.
Product
Socket’s precomputed reachability slashes false positives by flagging up to 80% of vulnerabilities as irrelevant, with no setup and instant results.
Product
Socket is launching experimental protection for Chrome extensions, scanning for malware and risky permissions to prevent silent supply chain attacks.