You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP

@invertase/storage-image-processing-api

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@invertase/storage-image-processing-api

A JavaScript utility library for the Firebase Storage Image Processing API Extension.

0.1.0
latest
Version published
Maintainers
3
Created

Storage Image Processing API Utilities

This package contains utilities for interacting with the Firebase Storage Image Processing API Extension.

Installation

npm i --save @invertase/storage-image-processing-api

Usage

builder

Returns a StorageImageProcessingApi instance which can be used to build an array of operations to be applied to an image via the extension.

import { builder } from '@invertase/storage-image-processing-api';

const output = builder()
  // Input required
  .input({
    source: 'https://example.com/image.jpg',
  })
  .flip()
  .grayscale()
  .rotate({ angle: 90 })
  // Output required
  .output({
    format: 'png',
  });

Once created, the api provides the means to return the operations as JSON, a JSON string or an encoded JSON string suitable for GET requests in your browser.

const json = output.toJSON();
const jsonString = output.toJSONString();
const encodedJsonString = output.toEncodedJSONString();

FAQs

Package last updated on 22 Sep 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