UNPKG

dynamodb-toolbox

Version:

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

22 lines (21 loc) 439 B
import { pipe } from './pipe.js'; export class Trimmer { constructor() { this.transformerId = 'trim'; } encode(decoded) { return decoded.trim(); } decode(encoded) { return encoded; } toJSON() { return { transformerId: this.transformerId }; } pipe(transformer) { return pipe(this, transformer); } } export const trim = () => new Trimmer();