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

@abmaonline/less-tree

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@abmaonline/less-tree

Get less import file tree

  • 0.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
107
decreased by-25.69%
Maintainers
1
Weekly downloads
 
Created
Source

@abmaonline/less-tree

NPM version node License npm download

Get less import vinyl file tree

Originally created by LingyuCoder, but no longer available on github and made some changes to make it more robust.

Installation

$ npm install --save @abmaonline/less-tree

Usage

Create Tree

const lessTree = require('@abmaonline/less-tree');

// create less vinyl file tree
let root = lessTree('a.less');

root.children // => get tree children vinyl file object

toTreeObject

// get tree object
root.toTreeObject();
/*
{
  'b.less': {
    'd.less': {
      'sub/f.less': {}
    }
  },
  'c.less': {
    'd.less': {
      'sub/f.less': {}
    }
  },
  'sub/e.less': {}
}
*/

toTreeString

// get tree string
root.toTreeString();
/*
├─ b.less
│  └─ d.less
│     └─ sub/f.less
├─ c.less
│  └─ d.less
│     └─ sub/f.less
└─ sub/e.less
*/

Todo

  • tree walker
  • ...

Test

$ npm run test
$ npm run test-cov

FAQs

Package last updated on 21 Jun 2020

Did you know?

Socket

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.

Install

Related posts

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