1234567891011121314151617 |
- const hashColorPattern = /^#[0-9a-fA-F]{6}$|^#[0-9a-fA-F]{3}$/;
- const unpaddedFractionalNumbersPattern = /\.[0-9]/;
- const isMixinToken = (token) => {
- const [, symbol] = token;
- const [char] = symbol;
- return (
- (char === '.' || char === '#') &&
-
- hashColorPattern.test(symbol) === false &&
-
- unpaddedFractionalNumbersPattern.test(symbol) === false
- );
- };
- module.exports = { isMixinToken };
|