9

Is there something like is-map($some_variable) in SASS?

I have tried looking into the documentation but there is none there.

qtgye
  • 3,580
  • 2
  • 15
  • 30

1 Answers1

22

You can implement it with the type-of function, like this one:

@function is-map($var){
  @return type-of($var) == 'map';
}
Amit Avihud
  • 321
  • 1
  • 3