npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vkminiapps-params-checker

v1.0.11

Published

Функция для проверка параметров запуска VK Mini Apps, использующая код из официальной документации ВКонтакте.

Downloads

82

Readme

Для чего?

Пакет для проверки параметров запуска VK Mini Apps. Код взят из официальной документации и собран в один пакет для удобства использования.

Начало работы с пакетом

Для начала установите пакет:

npm i vkminiapps-params-checker

Проинициализируйте его в своём проекте:

const check = require("vkminiapps-params-checker");
// или можно импортом
import check from "vkminiapps-params-checker";

Использование:

const isValidParams = check(
  "параметры запуска",
  "секретный ключ приложения",
  "время жизни в секундах"
);

Функция возвращает true или false.

Время жизни параметров

При каждой генерации параметров к ним прикрепляется дата создания: vk_ts.

Изначально параметры запуска будут "жить" два часа - 7200 секунд. И Вы можете изменить это значения, передав нужное число.

В примере выше мы прокидываем параметры запуска, секретный ключ приложения, а также время жизни. В качестве последнего Вы можете прокинуть как число, так и 0.

Если указано 0, то проверка на "протухшесть" параметров запука будет отключена.

const isValidParams = check("", "", 3600); // Параметры запуска будут жить час (3600 секунд)
const isValidParams = check("", "", 0); // Параметры запуска будут жить вечно, пока не изменится, например, ключ от приложения.

Пример:

const isValidParams = check(
  "vk_access_token_settings=&vk_app_id=7948530&vk_are_notifications_enabled=0&vk_is_app_user=1&vk_is_favorite=0&vk_language=ru&vk_platform=desktop_web&vk_ref=other&vk_ts=1634454189&vk_user_id=172118960&sign=5lVUWU19M_xQpENllCGe2Mi-SGWC8K5i7FdkfHOwggA",
  "cBpgoP3d9WggrQ81qtNhw"
); // false