UNPKG

dynamodb-toolbox

Version:

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

9 lines (8 loc) 337 B
import { isObject } from '../../../../utils/validation/isObject.js'; import { $IS_EXTENSION } from './isExtension.js'; export const $SUBTRACT = Symbol('$SUBTRACT'); export const $subtract = (a, b) => ({ [$IS_EXTENSION]: true, [$SUBTRACT]: [a, b] }); export const isSubtraction = (input) => isObject(input) && $SUBTRACT in input;