We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 23ec2af commit ff3c69bCopy full SHA for ff3c69b
lib/createExpectedPropertiesOrder.js
@@ -1,29 +1,11 @@
1
-const _ = require('lodash');
2
-
3
module.exports = function createExpectedPropertiesOrder(input) {
4
const order = {};
5
6
- if (_.isPlainObject(input[0])) {
7
- let propertyIndex = 0;
8
9
- input.forEach((group, groupIndex) => {
10
- group.properties.forEach(property => {
11
- order[property] = {
12
- propertyIndex,
13
- groupIndex,
14
- emptyLineBefore: group.emptyLineBefore,
15
- };
16
17
- propertyIndex++;
18
- });
19
20
- } else {
21
- input.forEach((property, propertyIndex) => {
22
23
24
25
26
- }
+ input.forEach((property, propertyIndex) => {
+ order[property] = {
+ propertyIndex,
+ };
+ });
27
28
return order;
29
};
0 commit comments