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 - npm Package Compare versions

Comparing version 1.0.0 to 2.0.0

dist/cli.d.ts

128

dist/index.d.ts

@@ -1,62 +0,72 @@

export interface ProductCategory {
name: string;
id: string[];
taste: boolean;
sweet: boolean;
type Product = {
ProductID: number;
ProductName: string;
ProductBottledVolume: number;
ProductAlchoholVolume: number;
ProductPrice: number;
ProductCategory: {
name: string;
id: string[];
taste: boolean;
sweet: boolean;
subCategories: null | string[];
};
ProductSubCategory: null | string;
ProductCountryOfOrigin: string;
ProductSpecialReserve: boolean;
ProductOrganic: boolean;
ProductContainerType: string;
ProductPlaceOfOrigin: string;
ProductDistrictOfOrigin: string;
ProductWine: string;
ProductInventory: number;
ProductDateOnMarket: string;
ProductIsTemporaryOnSale: boolean;
ProductIsGift: boolean;
ProductIsInThema: boolean;
ProductIsAvailableInStores: boolean;
ProductIsSpecialOrder: boolean;
ProductStoreSelected: null | string;
ProductTasteGroup: string;
ProductTasteGroup2: string;
ProductTasteGroup2Description: null | string;
ProductPackagingClosing: string;
ProductPackagingContainer: string;
ProductSpecialMarking: string[];
ProductSeasonCode: string;
MinimumQuantity: number;
UseMinimumQuantityAsUnit: boolean;
IsSpecialOrderAndOutOfStock: boolean;
ProductSearchGrape: string;
ProductProducer: string;
ProductShortDescription: string;
ProductBackupInventory: number;
ProductPackagingWeight: number;
ProductCarbonFootprint: number;
SupplierId: null | string;
ProductAvailableUnits: string;
ProductSaleStatus: string;
ProductImageUrl: string;
};
declare enum Category {
Beer = "beer",
Red = "red",
White = "white",
Rose = "rose",
Bubbly = "bubbly",
Fortified = "fortified",
CiderFruitAndBlends = "ciderfruitandblends",
SakeAndMead = "sakeandmead",
Strong = "strong",
Aromatised = "aromatised"
}
type CategoryData = {
[value in Category]?: Product[];
};
type CategoryOptions = {
[value in Category]?: boolean;
};
export interface Beverage {
ProductID: number;
ProductName: string;
ProductBottledVolume: number;
ProductAlchoholVolume: number;
ProductPrice: number;
ProductFoodCategories: string;
ProductCategory: ProductCategory;
ProductSubCategory: null;
ProductCountryOfOrigin: string;
ProductSpecialReserve: boolean;
ProductOrganic: boolean;
ProductContainerType: string;
ProductPlaceOfOrigin: string;
ProductDistrictOfOrigin: string;
ProductWine: string;
ProductInventory: number;
ProductYear: string;
ProductDateOnMarket: string;
ProductIsTemporaryOnSale: boolean;
ProductIsGift: boolean;
ProductIsInThema: boolean;
ProductIsAvailableInStores: boolean;
ProductIsSpecialOrder: boolean;
ProductStoreSelected: null;
ProductTasteGroup: string;
ProductTasteGroup2: string;
ProductTasteGroup2Description: null;
ProductPackagingClosing: string;
ProductSpecialMarking: string[];
ProductSeasonCode: string;
MinimumQuantity: number;
UseMinimumQuantityAsUnit: boolean;
IsSpecialOrderAndOutOfStock: boolean;
ProductSearchGrape: string;
ProductProducer: string;
ProductShortDescription: string;
ProductBackupInventory: number;
ProductPackagingWeight: number;
ProductCarbonFootprint: number;
ProductAvailableUnits: string;
ProductImageUrl: string;
}
declare const getProducts: (options?: CategoryOptions) => Promise<CategoryData>;
export function get(options?: {
beers?: boolean;
redWines?: boolean;
whiteWines?: boolean;
roseWines?: boolean;
sparklingWines?: boolean;
dessertWines?: boolean;
cidersAndSodas?: boolean;
spirits?: boolean;
}): Promise<{}>;
//# sourceMappingURL=index.d.ts.map
export { getProducts };
{
"name": "vinbudin",
"version": "1.0.0",
"version": "2.0.0",
"bin": {
"vinbudin": "src/cli.js"
"vinbudin": "dist/src/cli.js"
},
"description": "Fetches product data from www.vinbudin.is",
"homepage": "https://github.com/valgeirb/vinbudin",
"main": "src/index.js",
"engines": {
"node": ">=16.0.0"
},
"type": "module",
"main": "dist/src/index.js",
"module": "dist/src/index.mjs",
"types": "dist/index.d.ts",
"files": [
"src/",
"dist/"
"dist"
],
"types": "dist/index.d.ts",
"scripts": {
"build": "tsup src/index.ts src/cli.ts",
"release": "npm run build && npm publish && git push --follow-tags",
"test": "echo \"Error: no test specified\" && exit 1"

@@ -29,10 +35,13 @@ },

"dependencies": {
"inquirer": "^7.3.3",
"listr": "^0.14.3",
"node-fetch": "^2.6.1",
"tsc": "^2.0.4"
"inquirer": "^9.2.14",
"listr2": "^8.0.2",
"node-fetch": "^3.3.2"
},
"devDependencies": {
"prettier": "^2.2.1"
"@types/inquirer": "^9.0.7",
"prettier": "^2.8.8",
"ts-node": "^10.9.2",
"tsup": "^8.0.2",
"typescript": "^5.3.3"
}
}

@@ -5,4 +5,7 @@ <img width="75px" height="75px" align="right" alt="Vinbudin Logo" src="https://raw.githubusercontent.com/valgeirb/vinbudin/main/assets/vinbudin.svg?sanitize=true" title="vinbudin"/>

> Fetches product data from www.vinbudin.is
## Features
- ⚡ Fetches product data from www.vinbudin.is
- 🏷️ Fully typed
<img src="https://raw.githubusercontent.com/valgeirb/vinbudin/main/assets/vinbudin.gif">

@@ -28,11 +31,18 @@

## Usage
## Setup
Install from npm and save to your `package.json`:
```bash
# pnpm
pnpm add -D vinbudin
npm install vinbudin --save
# npm
npm i -D vinbudin
# yarn
yarn add -D vinbudin
```
## Methods
### `vinbudin.get(products) -> promise`
### `vinbudin.getProducts(products) -> promise`

@@ -47,10 +57,12 @@ Gets products from www.vinbudin.is

{
beers: true,
redWines: true,
whiteWines: true,
roseWines: true,
sparklingWines: true,
dessertWines: true,
cidersAndSodas: true,
spirits: true,
beer: true,
red: true,
white: true,
rose: true,
bubbly: true,
fortified: true,
ciderfruitandblends: true,
sakeandmead: true,
strong: true,
aromatised: true,
}

@@ -63,46 +75,18 @@ ```

```javascript
const vinbudin = require("vinbudin");
```ts
import { getProducts } from 'vinbudin'
vinbudin.get().then((products) => {
getProducts().then((products) => {
// Handle the data
console.log(products);
});
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);
});
getProducts({
beer: true,
bubbly: true,
}).then((products) => {
// Handle the data
console.log(products)
})
```
### Saving results to a local file
```javascript
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();
```
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