New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

treeboxjs

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

treeboxjs - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

2

package.json
{
"name": "treeboxjs",
"version": "1.0.3",
"version": "1.0.4",
"description": " Display and navigate hierarchical views ",

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

@@ -35,3 +35,3 @@ <div align="right">

```js
import TreeBox from 'treeboxjs';
const TreeBox = require('treeboxjs');

@@ -59,3 +59,3 @@ ...

```js
import TreeBox from 'treeboxjs';
const TreeBox = require('treeboxjs');

@@ -73,9 +73,9 @@ const nodes = {

file: {
display: `
<div>
<p>Another file</p>
<p>Multiple elements must be wrapped in a single enclosing element</p>
<a treebox-href="/directory/file">Link to /directory/file within treebox</a>
</div>
`,
display: String.raw`
<div>
<p>Another file</p>
<p>Multiple elements must be wrapped in a single enclosing element</p>
<a treebox-href="/directory/file">Link to /directory/file within treebox</a>
</div>
`.trim(),
},

@@ -85,3 +85,7 @@ },

const root = document.getElementById('myTreeBoxRoot');
// const root = document.getElementById('myTreeBoxRoot'); // if in the browser
const root = {
appendChild: (x) => console.log('Rendered:\n', x),
removeChild: () => console.log('\nCleared\n'),
};

@@ -93,2 +97,28 @@ const tb = new TreeBox({nodes, root}); // Initiate treebox and append it to the "root" element

tb.navigate('/'); // This code will cause treebox to render the `display` HTML at `nodes.children`
/* OUTPUT: */
/*
* Rendered:
* <h1>treebox example</h1>
*
* Cleared
*
* Rendered:
* <div>
* <p>Another file</p>
* <p>Multiple elements must be wrapped in a single enclosing element</p>
* <a treebox-href="/directory/file">Link to /directory/file within treebox</a>
* </div>
*
* Cleared
*
* Rendered:
* <p>A file</p>
*
* Cleared
*
* Rendered:
* <h1>treebox example</h1>
*/
```
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