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

@entur/create-offer-configurations-from-offer-to-buy

Package Overview
Dependencies
Maintainers
12
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@entur/create-offer-configurations-from-offer-to-buy

Create an array of offer configurations exactly as prescribed by the possibleTravellerIds field in an OfferToBuy

  • 2.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
189
increased by1011.76%
Maintainers
12
Weekly downloads
 
Created
Source

@entur/create-offer-configurations-from-offer-to-buy

Create an array of offer configurations exactly as prescribed by the possibleTravellerIds field in an OfferToBuy

Installation

Install with npm

npm install @entur/create-offer-configurations-from-offer-to-buy

Install with yarn

yarn add @entur/create-offer-configurations-from-offer-to-buy

Usage/Examples

import { createOfferConfigurationsFromOfferToBuy } from "@entur/create-offer-configurations-from-offer-to-buy";

createOfferConfigurationsFromOfferToBuy(
  {
    id: "7048884e-2c16-4305-92cc-b56fb4ea779a",
    numberToBuy: 2,
    withUpgradeProducts: [],
    possibleTravellerIds: [["3543283", "3518762"], ["ADULT-0-anonymous"]],
  },
  offerOrOptionalProducts
);

/*
 * [
 *   {
 *     offerId: "7048884e-2c16-4305-92cc-b56fb4ea779a",
 *     selectedTravellerIds: ["3543283", "3518762"],
 *   },
 *   {
 *     offerId: "7048884e-2c16-4305-92cc-b56fb4ea779a",
 *     selectedTravellerIds: ["ADULT-0-anonymous"],
 *   },
 * ];
 */

Running Tests

npm run test

Contributing

Contributions are always welcome!

Fork the repository from and open a PR.

Authors

  • @vages

FAQs

Package last updated on 25 Jan 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