UNPKG

@frakters/nft-lending-v2

Version:

Client library for interacting with nft lenging solana program

25 lines (24 loc) 706 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.throwIfEmpty = exports.throwIfNull = exports.throwIfUndefined = void 0; function throwIfUndefined(value, message = 'Not found') { if (value === undefined) { throw new Error(message); } return value; } exports.throwIfUndefined = throwIfUndefined; function throwIfNull(value, message = 'Not found') { if (value === null) { throw new Error(message); } return value; } exports.throwIfNull = throwIfNull; function throwIfEmpty(value, message = 'Not found') { if (value.length === 0) { throw new Error(message); } return value; } exports.throwIfEmpty = throwIfEmpty;