UNPKG

dynamodb-toolbox

Version:

Lightweight and type-safe query builder for DynamoDB and TypeScript.

16 lines (15 loc) 775 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.parseClientRequestToken = void 0; const dynamoDBToolboxError_js_1 = require("../errors/dynamoDBToolboxError.js"); const isString_js_1 = require("../utils/validation/isString.js"); const parseClientRequestToken = (clientRequestToken) => { if (!(0, isString_js_1.isString)(clientRequestToken)) { throw new dynamoDBToolboxError_js_1.DynamoDBToolboxError('options.invalidClientRequestToken', { message: `Invalid client request token option: '${String(clientRequestToken)}'. 'clientRequestToken' must be a string.`, payload: { clientRequestToken } }); } return clientRequestToken; }; exports.parseClientRequestToken = parseClientRequestToken;