Method: Sass::Script::Functions#type_of

Defined in:
lib/sass/script/functions.rb

#type_of($value) ⇒ Sass::Script::Value::String

Returns the type of a value.

Examples:

type-of(100px)  => number
type-of(asdf)   => string
type-of("asdf") => string
type-of(true)   => bool
type-of(#fff)   => color
type-of(blue)   => color
type-of(null)   => null
type-of(a b c)  => list
type-of((a: 1, b: 2)) => map
type-of(get-function("foo")) => function

Parameters:

Returns:



1698
1699
1700
1701
# File 'lib/sass/script/functions.rb', line 1698

def type_of(value)
  value.check_deprecated_interp if value.is_a?(Sass::Script::Value::String)
  identifier(value.class.name.gsub(/Sass::Script::Value::/, '').downcase)
end