Skip to main content
This release is a pre-release — the latest non-prerelease version of @how2validate/how2validate is 0.0.1. Jump to this version

A CLI tool to validate secrets for different services.

This package works with Node.js, Deno, BunIt is unknown whether this package works with Cloudflare Workers, Browsers
It is unknown whether this package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
It is unknown whether this package works with Browsers
JSR Score
47%
Published
a week ago (0.0.2-beta.37)
function validate
validate(
provider: string,
service: string,
secret: string,
response: boolean,
report: boolean,
isBrowser?: boolean,
): Promise<
{ }
| ""
| ValidationResult
| undefined
>

Validate the provided secret using the given provider, service, and options.

Parameters

provider: string
  • The provider to use for validation.
service: string
  • The service to validate the secret with.
secret: string
  • The secret that needs to be validated.
response: boolean
  • Whether to get a response status for the secret.
report: boolean
  • Whether to generate a report for the validation.
optional
isBrowser: boolean = false
  • Whether the validation is being run in a browser environment.

Return Type

Promise<
{ }
| ""
| ValidationResult
| undefined
>
  • A promise that resolves when validation is complete.

Add Package

deno add jsr:@how2validate/how2validate

Import symbol

import { validate } from "@how2validate/how2validate";

---- OR ----

Import directly with a jsr specifier

import { validate } from "jsr:@how2validate/how2validate";

Add Package

npx jsr add @how2validate/how2validate

Import symbol

import { validate } from "@how2validate/how2validate";

Add Package

yarn dlx jsr add @how2validate/how2validate

Import symbol

import { validate } from "@how2validate/how2validate";

Add Package

pnpm dlx jsr add @how2validate/how2validate

Import symbol

import { validate } from "@how2validate/how2validate";

Add Package

bunx jsr add @how2validate/how2validate

Import symbol

import { validate } from "@how2validate/how2validate";