@nova-odm/expressions
Version:
Composable expression objects for Amazon DynamoDB
25 lines • 992 B
JavaScript
;
var _a;
Object.defineProperty(exports, "__esModule", { value: true });
exports.AttributeValue = void 0;
var MARSHALLED_ATTRIBUTE_VALUE_TAG = 'AmazonDynamoDbAttributeValue';
var EXPECTED_TOSTRING = "[object ".concat(MARSHALLED_ATTRIBUTE_VALUE_TAG, "]");
/**
* An object containing an already-marshalled DynamoDB AttributeValue.
* Intended to allow marshalled AttributeValues to be identified as such
* and distinguished from maps that resemble marshalled values.
*/
var AttributeValue = /** @class */ (function () {
function AttributeValue(marshalled) {
this.marshalled = marshalled;
this[_a] = MARSHALLED_ATTRIBUTE_VALUE_TAG;
}
AttributeValue.isAttributeValue = function (arg) {
return arg instanceof AttributeValue
|| Object.prototype.toString.call(arg) === EXPECTED_TOSTRING;
};
return AttributeValue;
}());
exports.AttributeValue = AttributeValue;
_a = Symbol.toStringTag;
//# sourceMappingURL=AttributeValue.js.map