sass-maphacks
An Underscore/Lodash-like utility library for Sass maps
Install
npm install sass-maphacks --save-dev
Basic Usage
SCSS
This library needs to be imported into your sass pipeline. Below is an example using Gulp:
var gulp = ;var sass = ;var maphacks = ; gulp;
Once that is setup, simply @import
sass-maphacks as needed in your .scss
file:
;
Importing individual functions
If you wish to manually import and use indivdual functions in your code base (instead of importing all the sass-maphacks
things), you can do the following:
// Input (awesome-class.scss) ; ; .my-awesome-class // Output (awesome-class.css) .my-awesome-class
Functions
- _concat
- _extend
- _first
- _get
- _indexOf
- _isMap
- _last
- _set
More functions + docs coming soon ❤️
License
MIT © Jon Q