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

@justeat/cloudinary

Package Overview
Dependencies
Maintainers
30
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@justeat/cloudinary

Javascript library for working with Just Eat's Cloudinary service

  • 0.6.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
30
Created
Source

Cloudinary

Javascript library for working with Just Eat's Cloudinary service

Installation

npm install @justeat/cloudinary
yarn add @justeat/cloudinary

Usage

Create an instance

import Cloudinary from '@justeat/cloudinary';

const cloudinary = Cloudinary({
  tenant: 'uk',
  env: 'prod'
});
Tenant
  • Set the instance's tenant
  • Defaults to uk for undefined value
const cloudinary = Cloudinary({ tenant: 'uk' });
Environment
  • Set the instance's environment
  • Using a non-configured environment throws an INVALID_ENV error
const cloudinary = Cloudinary({ env: 'prod' });
ValueDescription
prod(default) Production
stagingStaging
testTest

Methods

Please check the source documentation for more detail on how to use the below methods

restaurant: Returns the cloudinary path of a restaurant image

const restaurantId = 2782084;
const opts = {
  cuisine: 'thai',
  quality: 'auto'
};
const url = cloudinary.restaurant(restaurantId, opts);

dishes: Returns the cloudinary path of a restaurant dish image

const restaurantId = 2782084;
const dishImage = 'assorted-meal.jpg'
const opts = {
  quality: 'auto'
};
const url = cloudinary.dishes(restaurantId, dishImage, opts);

url: Returns cloudinary url of restaurant image

const resourcePath = '/path/to/resource.jpg';
const params = {
  height: 100,
  width: 100
};
const url = cloudinary.url(resourcePath, params);

Development and Testing

Build: npm run build

Lint: npm run lint

Release: npm run release

Single run test: jest

Continuous test: jest --watchAll

Keywords

FAQs

Package last updated on 06 Feb 2020

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