Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

apna-link-js

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apna-link-js

Apna.Link URL Shortening API Wrapper for JavaScript and TypeScript

  • 1.0.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

This is a JavaScript and TypeScript wrapper for the Apna.Link URL shortening API.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

  • Node.js and npm installed on your local development machine.

Installing

To install the package, run:

npm install apna-link-js

Usage

First, import the package:

const ApnaLinkAPI = require('apna-link-js').default;

Then, create an instance of the ApnaLinkAPI class:

const api = new ApnaLinkAPI('your-api-key'); // Get it from https://apna.link/account

You can now use the api instance to interact with the Apna.Link API:

api.shorten('https://example.com')
    .then(shortUrl => console.log(`Short URL: ${shortUrl}`))
    .catch(error => console.error(`Error: ${error}`));

Running the tests

To run the tests, use the following command:

npm test

Based on

This library is based on the Apna.link API Docs.

Contributing

Please read CONTRIBUTING for details on our code of conduct, and the process for submitting pull requests to us.

License

This project is licensed under the MIT License - see the LICENSE file for details

Keywords

FAQs

Package last updated on 28 Nov 2023

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc