0.0.3 • Published 5 years ago

sass-array v0.0.3

Weekly downloads
4
License
MIT
Repository
github
Last release
5 years ago

Sass Array

A library that converts combinations of maps and lists to associative arrays and provides extra functionality to make working with both lists and maps more simplified.

Note: All array functions in this package will use the array() function to convert combinations of lists and maps to associative arrays before the handle function is executed.

Array Functions

Install

npm install sass-array --save-dev

Example

@import '~sass-array';

$test:(1,2,3);
$test2:(4,5,6);
$test3:(shape: circle, color: red);
$test4:(people: (shayne: 21, john: 24));

@debug(array_count($test));
// 3

@debug(array_get($test4, 'people.shayne'));
// 21

@debug(array_keys($test3));
// (0: shape, 1: color)

@debug(array_merge($test, $test2));
// (0: 1, 1: 2, 2: 3, 3: 4, 4: 5, 5: 6)

@debug(array_values($test3));
// (0: circle, 1: red)