less-plugin-lists

list/array manipulation for Less

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
less-plugin-lists
3831.1.25 years ago8 years agoMinified + gzip package size for less-plugin-lists in KB

Readme

<img src="https://cdn.rawgit.com/seven-phases-max/less-plugin-lists/1d76ab1b/docs/logo.svg" width="100%" height="48"/>
less-plugin-lists
Less plugin for lists/arrays manipulation.
npm version dependencies dev dependencies

Features

Functions

The plugin extends Less with the following functions:
  • at        - returns the value at the specified position in a list.
  • cat       - concatenates two or more lists.
  • flatten   - returns a one-dimensional list containing all elements of an input list.
  • join      - joins all elements of a list into a string.
  • l         - creates a comma or space separated list.
  • reverse   - returns list in reversed order.
  • slice     - returns selected portion of a list.
  • splice    - replaces or removes selected portion of a list and returns the modified copy.
  • transpose - transposes rows and columns of a list.
  • _inspect  - return a string representation of a list with debug/log formatting.

Installation

npm install -g less-plugin-lists

Using with lessc

lessc --lists file.less
For more details about using plugins with the command line Less compiler see the corresponding section in the Less documentation.

Using with common Less tools

Programmatic Usage

See Using a plugin in code.