Skip to content

Commit eb5249c

Browse files
authored
Rename to createGenericPropertyDescriptor()
This makes it clearer in which circumstances this function is used. Part of #280.
1 parent 7515db5 commit eb5249c

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

lib/utils/propertyDescriptors.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const parsers = require("../parsers");
44

55
const { AST_TYPES } = parsers;
66

7-
const getPropertyDescriptor = (property) => ({
7+
const createGenericPropertyDescriptor = (property) => ({
88
set(v) {
99
const value = parsers.prepareValue(v);
1010
if (parsers.hasVarFunc(value)) {
@@ -50,5 +50,5 @@ const getPropertyDescriptor = (property) => ({
5050
});
5151

5252
module.exports = {
53-
getPropertyDescriptor
53+
createGenericPropertyDescriptor
5454
};

scripts/generatePropertyDescriptors.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ for (const [canonicalProperty, { legacyAliasOf, styleDeclaration }] of propertyD
2929
}
3030
} else {
3131
for (const property of styleDeclaration) {
32-
descriptors.push(`"${property}": getPropertyDescriptor("${canonicalProperty}")`);
32+
descriptors.push(`"${property}": createGenericPropertyDescriptor("${canonicalProperty}")`);
3333
}
3434
}
3535
}
@@ -39,7 +39,7 @@ const output = `"use strict";
3939
// autogenerated - ${dateTodayFormatted}
4040
4141
${requires.sort().join("\n")}
42-
const { getPropertyDescriptor } = require("../utils/propertyDescriptors.js");
42+
const { createGenericPropertyDescriptor } = require("../utils/propertyDescriptors.js");
4343
4444
module.exports = {
4545
${descriptors.join(",\n ")}

0 commit comments

Comments
 (0)