Socket
Socket
Sign inDemoInstall

@abmaonline/parse-less-import

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @abmaonline/parse-less-import

Parse import from less file


Version published
Weekly downloads
115
decreased by-16.67%
Maintainers
1
Install size
5.21 kB
Created
Weekly downloads
 

Changelog

Source

0.1.0

  • Initial version based on parse-less-import by LingyuCoder
  • Added support for @import-once
  • Add keywords to result
  • Support empty imput

Readme

Source

@abmaonline/parse-less-import

NPM version node License npm download

Parse import from less file

Originally created by LingyuCoder, but no longer available on github and made some changes to make it work with older versions of less.

Node.js >= 6

Install

$ npm install --save @abmaonline/parse-less-import

Usage

const parse = require('@abmaonline/parse-less-import');

const content = `
@import '../a';
@import './b.less';
@import (multiple) './c.less';
@import (multiple, reference) './d.less';
`;

parse(content);
/*
[ { path: '../a', keywords: [] },
  { path: './b.less', keywords: [] },
  { path: './c.less', keywords: [ 'multiple' ] },
  { path: './d.less', keywords: [ 'multiple', 'reference' ] } ]
*/

Test

$ npm run test
$ npm run test-cov

Keywords

FAQs

Last updated on 07 Jun 2020

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.

Install

Related posts

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