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

@dependents/detective-less

Package Overview
Dependencies
Maintainers
3
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dependents/detective-less

Find the dependencies of a less file

  • 5.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
890K
decreased by-7.41%
Maintainers
3
Weekly downloads
 
Created
Source

@dependents/detective-less

CI npm version npm downloads

Find the dependencies of a less file

npm install @dependents/detective-less

Note: This is specific to the .less style syntax.

It's the LESS counterpart to detective, detective-amd, and detective-es6.

  • The AST is generated using the gonzales-pe parser.

Usage

const fs = require('fs');
const detective = require('@dependents/detective-less');

const content = fs.readFileSync('styles.less', 'utf8');

// list of imported file names (ex: 'foo.less', 'foo', etc)
const dependencies = detective(content);

// or to also detect any url() references to images, fonts, etc.
const allDependencies = detective(content, { url: true });

Options

  • url (optional): (Boolean) also detect any url() references to images, fonts, etc.

License

MIT

Keywords

FAQs

Package last updated on 14 Apr 2024

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