@google-cloud/projectify

  • Version 2.1.0
  • Published
  • 30.5 kB
  • No dependencies
  • Apache-2.0 license

Install

npm i @google-cloud/projectify
yarn add @google-cloud/projectify
pnpm add @google-cloud/projectify

Overview

A simple utility for replacing the projectid token in objects.

Index

Functions

function replaceProjectIdToken

replaceProjectIdToken: (value: any, projectId: string) => any;
  • Populate the {{projectId}} placeholder.

    Parameter

    {*} - Any input value that may contain a placeholder. Arrays and objects will be looped.

    Parameter projectId

    A projectId. If not provided {*} - The original argument with all placeholders populated.

    Throws

    {Error} If a projectId is required, but one is not provided.

Classes

class MissingProjectIdError

class MissingProjectIdError extends Error {}
  • Custom error type for missing project ID errors.

property message

message: string;

    Package Files (1)

    Dependencies (0)

    No dependencies.

    Dev Dependencies (11)

    Peer Dependencies (0)

    No peer dependencies.

    Badge

    To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

    You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@google-cloud/projectify.

    • Markdown
      [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@google-cloud/projectify)
    • HTML
      <a href="https://www.jsdocs.io/package/@google-cloud/projectify"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>