Skip to content

Commit 6bba325

Browse files
committed
Updates
1 parent 60dfd05 commit 6bba325

File tree

4 files changed

+8
-12
lines changed

4 files changed

+8
-12
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ jobs:
1010
fail-fast: false
1111
matrix:
1212
node-version:
13+
- 22
1314
- 20
1415
- 18
15-
- 16
1616
steps:
17-
- uses: actions/checkout@v3
18-
- uses: actions/setup-node@v3
17+
- uses: actions/checkout@v4
18+
- uses: actions/setup-node@v4
1919
with:
2020
node-version: ${{ matrix.node-version }}
2121
- run: npm install

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const reverseNames = Object.create(null);
44

55
// Create a list of reverse color names
66
for (const name in colorNames) {
7-
if (Object.hasOwnProperty.call(colorNames, name)) {
7+
if (Object.hasOwn(colorNames, name)) {
88
reverseNames[colorNames[name]] = name;
99
}
1010
}
@@ -106,7 +106,7 @@ cs.get.rgb = function (string) {
106106
return [0, 0, 0, 0];
107107
}
108108

109-
if (!Object.hasOwnProperty.call(colorNames, match[1])) {
109+
if (!Object.hasOwn(colorNames, match[1])) {
110110
return null;
111111
}
112112

index.test-d.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import {expectType} from 'tsd';
2-
import colorString from './index.js';
3-
import type {Model} from './index.js';
2+
import colorString, {type Model} from './index.js';
43

54
type GetColorResult = {model: Model; value: number[]} | undefined;
65
type GetSpecificTypeResult = number[] | undefined;

package.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212
"type": "module",
1313
"exports": "./index.js",
1414
"types": "./index.d.ts",
15-
"engines": {
16-
"node": ">=14.6"
17-
},
1815
"scripts": {
1916
"test": "xo && tsd && node test/basic.js"
2017
},
@@ -33,8 +30,8 @@
3330
"color-name": "^2.0.0"
3431
},
3532
"devDependencies": {
36-
"tsd": "^0.28.1",
37-
"xo": "^0.54.2"
33+
"tsd": "^0.31.2",
34+
"xo": "^0.60.0"
3835
},
3936
"keywords": [
4037
"color",

0 commit comments

Comments
 (0)