Socket
Socket
Sign inDemoInstall

map-to-linked

Package Overview
Dependencies
0
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.1 to 1.1.2

0

bin/map-to-linked.js

@@ -0,0 +0,0 @@ #!/usr/bin/env node

@@ -0,0 +0,0 @@ [{

@@ -0,0 +0,0 @@ const fs = require('fs')

@@ -0,0 +0,0 @@ {

8

index.js

@@ -7,3 +7,3 @@ const readline = require('readline')

var id = 1 // line number as id value
var _id = 1 // line number as id value
var result = [] // linked array

@@ -18,3 +18,3 @@ var current = { 0: -1 } // {layer: ID}

const layer = tabCount.length
current[layer] = id // replace id of current same layer
current[layer] = _id // replace id of current same layer
const pid = current[layer - 1]

@@ -29,4 +29,4 @@

var type = /:/.test(content) ? "file" : 'dir'
result.push({ id, pid, layer, type, content })
id++
result.push({ _id, pid, layer, type, content })
_id++
}

@@ -33,0 +33,0 @@ })

{
"name": "map-to-linked",
"version": "1.1.1",
"version": "1.1.2",
"description": "",

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

@@ -0,0 +0,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc