UNPKG

bc-payments-sdk

Version:

BetterCommerce's Payments NodeJS SDK is a complete solution for storefront clients that integrate payments. `bc-payments-sdk` is a single point interface for storefront clients for interacting with payment gateways.

31 lines (30 loc) 1.28 kB
/** * Compares two strings for equality. * * @param input1 - The first string to compare. * @param input2 - The second string to compare. * @param ignoreCase - Optional boolean to indicate if the comparison should ignore case differences. Defaults to false. * @returns A boolean indicating whether the two strings are equal. Returns false if either string is null or undefined. */ export declare const matchStrings: (input1: string, input2: string, ignoreCase?: boolean) => boolean; /** * Parses boolean from string. * @param stringValue * @returns */ export declare const stringToBoolean: (stringValue: string | undefined) => boolean; /** * Attempts to parse a JSON string and returns the resulting object. * * @param json - The JSON string to parse. * @returns The parsed object if successful, otherwise null if the input is invalid or parsing fails. */ export declare const tryParseJson: (json: any) => {}; /** * Executes a regular expression on a string and returns the match results. * * @param input - The string to search for matches. * @param regExp - The regular expression to execute. * @returns The match results as an array, or null if no match was found. */ export declare const groupMatch: (input: string, regExp: RegExp) => RegExpExecArray;