Socket
Socket
Sign inDemoInstall

cc-links

Package Overview
Dependencies
9
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    cc-links

Модуль для создания сокращенных ссылок


Version published
Weekly downloads
0
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Модуль для сокращения ссылок

NPM version NPM downloads

Сокращение ссылок

Модуль использует единственный метод для сокрещения вашей ссылки

const ccGenerator = require("cc-links");

const getLink = async () => {
    try {
        let short = await ccGenerator('https://my_site.pw')
        console.log(short)
    } catch (err) {
        console.error(err.message || "Error!")
    }
}

При успешном выполнении мы получим объект:

  /*
    short — объект, возвращаемый при успешном сокращении:
    {
      link: {
        "from": "https:vk.com/api/link/generate", Ваша ссылка для сокращения
        "to": "qupe.pw/R3s5sOvTj", сокращенный адрес
        "code": "R3s5sOvTj",
        "date": "2022-11-18T09:13:20.426Z",
      }
    }
  */

Обратите внимание что для каждой ссылки можно получить только 1 сокращение а так же вы не получите ошибку если пришлете любую строку не являющуюся url

Made by ХОР ЕНОТОВ

Keywords

FAQs

Last updated on 18 Nov 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc