is-separator-invalid ()
Indicates whether a specified value is invalid for a separator parameter.
Parameters
$value
- The value which is being validated.
- Type
*
Return Value
Boolean
true
if the value is a valid; otherwise,false
.
Example
@sass-fairy/list/src/_set-nth.sass
// Copyright (c) roydukkey. All rights reserved.
// Licensed under the MIT. See LICENSE file in the project root for full license information.
@use 'sass:list'
@use 'sass:meta'
@use '@sass-fairy/exception'
@function set-nth($list, $index, $value, $separator: auto)
$index: exception.validate-index('set-nth', 'index', $index, $list)
@if meta.type-of($index) != 'number'
@error $index
@if exception.is-separator-invalid($separator)
@error exception.separator('set-nth')
@return list.join(list.set-nth($list, $index, $value), (), $separator)