npm.io
1.1.0 • Published 5 years ago

sass-exception

Licence
MIT
Version
1.1.0
Deps
0
Size
18 kB
Vulns
0
Weekly
0
DeprecatedThis package is deprecated

sass-exception

Release Version License

This Sass module provides functions to standardize exception messages.

Install

Requires

Install the package:

npm install sass-exception

Use the package like any other Sass module:

@use 'sass-exception';

Depending on your setup, you may need to configure node_modules as include path:

const sass = require('sass');

sass.render({
  file: scss_filename,
  includePaths: ['node_modules']
});

Public API

is-separator-invalid ( $value ) Indicates whether a specified value is invalid for a separator parameter. parameter ( $message, $context, $names... ) Returns an error message stating an issue with one or more parameters. parameter-type ( $context, $name, $value, $types... ) Returns an error message stating a parameter received the wrong type. separator ( [$context] ) Returns an error message stating a separator parameter or variable received the wrong value. validate-index ( $context, $name, $value, $iterable ) Returns a valid index for the specified iterable; otherwise, an error message stating the reason the index is invalid. variable ( $message, $names... ) Returns an error message stating an issue with one or more variables. variable-type ( $name, $value, $types... [, $message] ) Returns an error message stating a variable received the wrong type.

Don't see the function you're looking for? Request a new feature describing a use case.

Keywords