first commit

This commit is contained in:
jefferyzhao
2025-07-31 17:44:12 +08:00
commit b9bdc8598b
42390 changed files with 4467935 additions and 0 deletions

49
node_modules/is-color-stop/test/index.test.js generated vendored Normal file
View File

@ -0,0 +1,49 @@
'use strict';
const assert = require('assert');
const isColorStop = require('..');
describe('is-color-stop', function () {
it('isColorStop', function () {
assert.ok(isColorStop('yellow'));
assert.ok(isColorStop('yellow', '12px'));
assert.ok(!isColorStop('yellow', 'px'));
assert.ok(isColorStop('yellow', 'calc(100%)'));
});
it('isColor', function () {
assert.ok(isColorStop.isColor('rgb(255, 255, 255)'));
});
it('isRGB', function () {
assert.ok(isColorStop.isRGB('rgb(255, 255, 255)'));
});
it('isRGBA', function () {
assert.ok(isColorStop.isRGBA('rgba(255, 255, 255, .9)'));
});
it('isHSL', function () {
assert.ok(isColorStop.isHSL('hsl(123, 45%, 67%)'));
});
it('isHSLA', function () {
assert.ok(isColorStop.isHSLA('hsla(123, 45%, 67%, .9)'));
});
it('isHex', function () {
assert.ok(isColorStop.isHex('#123456'));
});
it('isCSSColorName', function () {
assert.ok(isColorStop.isCSSColorName('yellow'));
});
it('isTransparent', function () {
assert.ok(isColorStop.isTransparent('transparent'));
});
it('isCSSLengthUnit', function () {
assert.ok(isColorStop.isCSSLengthUnit('px'));
});
});

34
node_modules/is-color-stop/test/unit.test.js generated vendored Normal file
View File

@ -0,0 +1,34 @@
'use strict';
const assert = require('assert');
const unit = require('../util/unit');
describe('unit', function () {
it('unit', function () {
assert.deepEqual(unit('.23rem'), {
number: '.23',
unit: 'rem',
});
assert.deepEqual(unit('.2.3rem'), {
number: '.2',
unit: '.3rem',
});
assert.deepEqual(unit('2.'), {
number: '2.',
unit: '',
});
assert.deepEqual(unit('+2.'), {
number: '+2.',
unit: '',
});
assert.deepEqual(unit('+-2.'), false);
assert.deepEqual(unit('.'), false);
assert.deepEqual(unit('.rem'), false);
});
});