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

google-drive-id-extractor

v1.0.0

Published

This npm package extracts the Google Drive file ID from any provided Google Drive link, making it easy to retrieve the ID programmatically. It's lightweight, simple to use, and supports various Google Drive link formats.

Downloads

3

Readme

google-drive-id-extractor

This npm package extracts the Google Drive file ID from a given Google Drive link. It is a lightweight and simple tool for developers who need to programmatically retrieve the file ID for further processing.

Features

  • Extracts file ID from any Google Drive link format
  • Simple and easy-to-use API
  • Supports different Google Drive URL formats (e.g., shareable links, direct links, etc.)

Installation

You can install the package using npm:

npm install google-drive-id-extractor

Or using yarn:

yarn add google-drive-id-extractor

Usage

To extract the Google Drive file ID from a link, you can use the following code:

import extractGoogleDriveId from "google-drive-id-extractor";

// Example Google Drive link
const link =
  "https://drive.google.com/file/d/1A2B3C4D5E6F7G8H9/view?usp=sharing";

// Extract the file ID
const fileId = extractGoogleDriveId(link);

console.log(fileId); // Output: 1A2B3C4D5E6F7G8H9

The extractGoogleDriveId function works with various formats of Google Drive links, such as:

  • https://drive.google.com/file/d/FILE_ID/view?usp=sharing
  • https://drive.google.com/open?id=FILE_ID
  • https://drive.google.com/uc?id=FILE_ID&export=download

API

extractGoogleDriveId(url)

Parameters:

  • url (string): The Google Drive URL from which you want to extract the file ID.

Returns:

  • string: The extracted file ID from the provided Google Drive link.

Example

import extractGoogleDriveId from "google-drive-id-extractor";

const fileId = extractGoogleDriveId(
  "https://drive.google.com/file/d/1A2B3C4D5E6F7G8H9/view"
);
console.log(fileId); // Output: 1A2B3C4D5E6F7G8H9

License

This package is offered by ToolsForFree.com. Visit the website for more free developer tools.

More Tools from ToolsForFree.com

One of the other useful tools offered by ToolsForFree.com is the Google Drive Direct Link Generator. This tool allows you to convert a Google Drive shareable link into a direct download link. It simplifies the process of sharing files by creating a link that triggers an automatic download instead of opening the Google Drive interface.

Contributions

Feel free to contribute to this package by submitting issues or making pull requests. We welcome feedback and improvements!


Happy coding!