sass-verify-required-keys
v1.0.4
Published
Verifies that all required keys are found in a map.
Downloads
26
Readme
sass-verify-required-keys
Verifies that all required keys are found in a map.
npm
https://www.npmjs.com/package/sass-verify-required-keys
Install with npm i sass-verify-required-keys
Examples
true -> key is required in the map.
false -> key is optional in the map.
$REQUIRED_KEYS: (
a: true,
b: true,
c: false,
);
// Ensures all required keys are in the map
@debug verify-required-keys(
(
a: 'value',
b: 'value',
),
$REQUIRED_KEYS
);
// => true; All required keys are in the map
// Does not check for extra keys
@debug verify-required-keys(
(
a: 'value',
b: 'value',
c: 'value',
d: 'value',
),
$REQUIRED_KEYS
);
// => true; All required keys are in the map