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

sassy-lists

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sassy-lists

A Sass API for lists.

  • 3.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.1K
increased by21.69%
Maintainers
1
Weekly downloads
 
Created
Source

SassyLists Gem Version

Here is a powerful toolbox providing you all the functions you need to manipulate your Sass lists. See complete documentation here.

How to use it

Install with Gem

  1. gem install SassyLists

Install with Bower

  1. bower install SassyLists --save-dev
  2. Import the partial in your Sass files

What's in there?

  • sl-chunk(): returns whether list contains $value
  • sl-comma-list(): initializes an empty comma-separated list
  • sl-contain(): returns whether the list contains the value
  • sl-count-values(): counts the number of occurrences of each value of list
  • sl-debug(): returns list as a string
  • sl-every(): returns whether all items from list pass test from given function
  • sl-explode(): explodes a string into a list using a string as a delimiter
  • sl-first(): returns first value in list
  • sl-flatten(): turns multidimensional list into a one-level list
  • sl-has-values(): checks if list is not empty
  • sl-has-multiple-values(): checks if list has more than one value
  • sl-insert-nth(): inserts value at index
  • sl-intersection(): returns a list of shared values across all given lists
  • sl-is-empty(): checks if list is empty
  • sl-is-single(): checks if list has a single value
  • sl-is-symmetrical(): checks if list is symmetrical
  • sl-last(): returns last value in list
  • sl-last-index(): returns last index of value in list
  • sl-loop(): shifts indexes in list
  • sl-prepend(): prepends value to list
  • sl-purge(): removes all false and null values from list
  • sl-random-value(): returns random value from list
  • sl-range(): returns a list of values between 1 and given value
  • sl-remove(): removes value in list
  • sl-remove-duplicates(): removes duplicate values from list
  • sl-remove-nth(): removes value at index
  • sl-replace(): replaces value in list
  • sl-replace-nth(): replaces value at index
  • sl-reverse(): reverses list
  • sl-shuffle(): shuffles list
  • sl-slice(): slices list
  • sl-sort(): sorts list
  • sl-some(): returns whether some values from list pass test from given function
  • sl-sum(): sums all unitless values in list
  • sl-tail(): returns anything but the first element in list
  • sl-to-list(): casts value as list
  • sl-to-map(): casts list as map using indexes as keys
  • sl-to-string(): casts list as string (JS .join())
  • sl-union(): returns a list of values from given lists minus duplicates
  • sl-walk(): applies a function to every value of list

If you feel like an explorer, you can have a look at the code here.

Requirements

  • Sass ~> 3.4

If you are looking for the last version of SassyLists running on Sass 3.2, install 0.4.9.

If you are looking for the last version of SassyLists running on Sass 3.3, install 2.2.5.

Some functions depend on other functions. If you include functions individually, make sure to check for these dependencies in their respective docs.

Also read

Credits

A lot of thanks to all contributors and to at-import for their support.

Keywords

FAQs

Package last updated on 04 Jan 2017

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