New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

vinbudin

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vinbudin

Fetches product data from www.vinbudin.is

  • 1.0.0
  • npm
  • Socket score

Version published
Weekly downloads
10
decreased by-28.57%
Maintainers
1
Weekly downloads
 
Created
Source
Vinbudin Logo

vinbudin

Fetches product data from www.vinbudin.is

Why?

Vínbúðin does not provide an open API. This package can be used to analyse their product data or create something else from it.

How?

This package extracts data from www.vinbudin.is and returns a JSON Object.

CLI

The quickest way to try this package out is using the CLI:

npx vinbudin

This will allow you to select what product categories you want to fetch. The data will be saved as a products.json file in the same folder that you ran the package.

Usage

Install from npm and save to your package.json:

npm install vinbudin --save

Methods

vinbudin.get(products) -> promise

Gets products from www.vinbudin.is

  • products (Object) is an options object that you can optionally pass in if you want some subset of the data.

It looks like this:

{
  beers: true,
  redWines: true,
  whiteWines: true,
  roseWines: true,
  sparklingWines: true,
  dessertWines: true,
  cidersAndSodas: true,
  spirits: true,
}

Examples

Basic

const vinbudin = require("vinbudin");

vinbudin.get().then((products) => {
  // Handle the data
  console.log(products);
});

// You can also provide an options object to get specific data
vinbudin
  .get({
    beers: true,
    spirits: true,
  })
  .then((products) => {
    // Handle the data
    console.log(products);
  });

Saving results to a local file

const vinbudin = require("vinbudin");
const fs = require("fs");

async function vinbudinExample() {
  const products = await vinbudin.get();

  fs.writeFile(
    "data.json",
    JSON.stringify(products, null, 2),
    "utf8",
    (err) => {
      if (err) {
        return console.log(err);
      }

      console.log("Fetch complete, see './data.json'");
    },
  );
}

vinbudinExample();

Keywords

FAQs

Package last updated on 08 Dec 2022

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