Leafo\ScssPhp\Compiler::libNth PHP Method

libNth() protected method

protected libNth ( $args )
    protected function libNth($args)
    {
        $list = $this->coerceList($args[0]);
        $n = $this->assertNumber($args[1]);
        if ($n > 0) {
            $n--;
        } elseif ($n < 0) {
            $n += count($list[2]);
        }
        return isset($list[2][$n]) ? $list[2][$n] : static::$defaultValue;
    }
Compiler