Skip to content

Commit

Permalink
Извлкекает фунцкию генерации комментариев
Browse files Browse the repository at this point in the history
  • Loading branch information
harl-i committed Dec 8, 2024
1 parent efc6edd commit b6fd41a
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const LIKES_COUNT = {

const RANDOM_VALUE = {
MIN: 0,
MAX: Number.MAX_VALUE
MAX: 100000
};

const PHOTO_DESCRIPTIONS = ['Закат над океаном',
Expand Down Expand Up @@ -55,20 +55,12 @@ function getRandomPhotoObjects({ photoGeneratorParameters }) {
paramCount,
paramGetRandomInteger,
paramGetUniqueValue,
paramGetRandomArrayElements,
paramDescriptions,
paramRandomValue,
paramObjectsCount,
paramCommentsCount,
paramAvatarsCount,
paramSentencesCount,
paramLikesCount,
paramMessages,
paramNames
} = photoGeneratorParameters;

const objects = [];
const getUniqueCommentIdValue = paramGetUniqueValue(paramGetRandomInteger, paramRandomValue.MIN, paramRandomValue.MAX);
const getUniquePhotoIdValue = paramGetUniqueValue(paramGetRandomInteger, paramObjectsCount.MIN, paramObjectsCount.MAX);
const getUniqueUrlValue = paramGetUniqueValue(paramGetRandomInteger, paramObjectsCount.MIN, paramObjectsCount.MAX);

Expand Down Expand Up @@ -164,4 +156,3 @@ const parameters = {
};

const generatedObjects = getRandomPhotoObjects({photoGeneratorParameters: parameters});
console.log(generatedObjects);

0 comments on commit b6fd41a

Please sign in to comment.