Skip to content
This repository was archived by the owner on Apr 23, 2024. It is now read-only.

add nodejs example - #4

Open
nocell wants to merge 3 commits into
VKCOM:masterfrom
nocell:master
Open

add nodejs example#4
nocell wants to merge 3 commits into
VKCOM:masterfrom
nocell:master

Conversation

@nocell

@nocell nocell commented Mar 21, 2019

Copy link
Copy Markdown

No description provided.

Comment thread README.md Outdated
Comment thread README.md
const checkVKQueryParamsSign = params => {
const list_of_params = Object.entries(params) //перевод в обьекта параметро в список
.filter(e => e[0].startsWith('vk_')) //фильтрация параметров VK
.sort((a, b) => {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Было бы круто вынести лямбда функции для filter и sort в отдельные методы, так код чище и читабельнее будет

Comment thread README.md Outdated
Comment thread README.md Outdated
}
return 0
}) //сортировка по алфавиту
const params_str = stringify(

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

camelCase для названия переменных

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Исправил.

Comment thread README.md
Comment thread README.md
'?vk_user_id=494075&vk_app_id=6736218&vk_is_app_user=1&vk_are_notifications_enabled=1&vk_language=ru&vk_access_token_settings=&vk_platform=android&sign=exTIBPYTrAKDTHLLm2AwJkmcVcvFCzQUNyoa6wAjvW6k',
CLIENT_SECRET = 'wvl68m4dR1UpLrVRli'

const isVKParam = e => e[0].startsWith('vk_')

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А что такое e?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants