UNPKG

@codification/cutwater-aws

Version:

A library providing general functionality for TypeScript based AWS projects.

21 lines 828 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.parseValue = exports.formatValue = exports.toValuePart = exports.VALUE_SEPERATOR = void 0; exports.VALUE_SEPERATOR = '#'; const toValuePart = (value, index, defaultValue) => { const parts = (0, exports.parseValue)(value); return parts.length > index ? parts[index] : defaultValue; }; exports.toValuePart = toValuePart; const formatValue = (...elements) => { return elements .filter((el) => el !== undefined) .map((el) => (typeof el === 'number' ? el.toString() : el)) .join(exports.VALUE_SEPERATOR); }; exports.formatValue = formatValue; const parseValue = (value) => { return value ? value.split(exports.VALUE_SEPERATOR) : []; }; exports.parseValue = parseValue; //# sourceMappingURL=DynamoUtils.js.map