{"id":50926112,"url":"https://github.com/ruicsh/dynoexpr","last_synced_at":"2026-06-16T23:03:35.409Z","repository":{"id":41896794,"uuid":"251724553","full_name":"ruicsh/dynoexpr","owner":"ruicsh","description":"Expression builder for AWS.DynamoDB.DocumentClient","archived":false,"fork":false,"pushed_at":"2024-06-14T09:04:21.000Z","size":1361,"stargazers_count":129,"open_issues_count":2,"forks_count":9,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-05-30T03:08:29.311Z","etag":null,"topics":["aws","aws-dynamodb","dynamodb","expression-builders"],"latest_commit_sha":null,"homepage":"https://npm.im/@tuplo/dynoexpr","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ruicsh.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-31T20:33:07.000Z","updated_at":"2026-04-06T19:49:05.000Z","dependencies_parsed_at":"2023-02-08T05:30:47.889Z","dependency_job_id":"c35409d7-2130-463e-832d-42cab488cb38","html_url":"https://github.com/ruicsh/dynoexpr","commit_stats":null,"previous_names":["ruicsh/dynoexpr"],"tags_count":62,"template":false,"template_full_name":null,"purl":"pkg:github/ruicsh/dynoexpr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruicsh%2Fdynoexpr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruicsh%2Fdynoexpr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruicsh%2Fdynoexpr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruicsh%2Fdynoexpr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ruicsh","download_url":"https://codeload.github.com/ruicsh/dynoexpr/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruicsh%2Fdynoexpr/sbom","scorecard":{"id":902481,"data":{"date":"2025-08-11","repo":{"name":"github.com/tuplo/dynoexpr","commit":"0d0bf4c00c3ec74652005425b5d6692d942f5828"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.5,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":0,"reason":"Found 1/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/backup.yml:1","Warn: no topLevel permission defined: .github/workflows/build.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/backup.yml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/tuplo/dynoexpr/backup.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/backup.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/tuplo/dynoexpr/backup.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/tuplo/dynoexpr/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/tuplo/dynoexpr/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/tuplo/dynoexpr/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/tuplo/dynoexpr/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/tuplo/dynoexpr/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:40: update your workflow using https://app.stepsecurity.io/secureworkflow/tuplo/dynoexpr/build.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:45: update your workflow using https://app.stepsecurity.io/secureworkflow/tuplo/dynoexpr/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:56: update your workflow using https://app.stepsecurity.io/secureworkflow/tuplo/dynoexpr/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:59: update your workflow using https://app.stepsecurity.io/secureworkflow/tuplo/dynoexpr/build.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:66: update your workflow using https://app.stepsecurity.io/secureworkflow/tuplo/dynoexpr/build.yml/main?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/build.yml:25","Warn: npmCommand not pinned by hash: .github/workflows/build.yml:45","Warn: npmCommand not pinned by hash: .github/workflows/build.yml:64","Info:   0 out of   9 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   3 third-party GitHubAction dependencies pinned","Info:   0 out of   3 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: license:0","Info: FSF or OSI recognized license: MIT License: license:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 1 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"20 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-67mh-4wv8-2f99","Warn: Project is vulnerable to: GHSA-78xj-cgh5-2h22","Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm","Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36","Warn: Project is vulnerable to: GHSA-64vr-g452-qvp3","Warn: Project is vulnerable to: GHSA-9cwx-2883-4wfx","Warn: Project is vulnerable to: GHSA-vg6x-rcgg-rjx6","Warn: Project is vulnerable to: GHSA-x574-m823-4x7w","Warn: Project is vulnerable to: GHSA-4r4m-qw57-chr8","Warn: Project is vulnerable to: GHSA-xcj6-pq6g-qj4x","Warn: Project is vulnerable to: GHSA-356w-63v5-8wf4","Warn: Project is vulnerable to: GHSA-859w-5945-r5v3","Warn: Project is vulnerable to: GHSA-9crc-q9x8-hgqq"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-24T16:08:12.241Z","repository_id":41896794,"created_at":"2025-08-24T16:08:12.241Z","updated_at":"2025-08-24T16:08:12.241Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34426745,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-16T02:00:06.860Z","response_time":126,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","aws-dynamodb","dynamodb","expression-builders"],"created_at":"2026-06-16T23:03:34.769Z","updated_at":"2026-06-16T23:03:35.401Z","avatar_url":"https://github.com/ruicsh.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cbr /\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"logo.png\" alt=\"Logo\" width=\"120\" height=\"120\"\u003e\n\n  \u003ch1 align=\"center\"\u003edynoexpr\u003c/h3\u003e\n\n  \u003cp align=\"center\"\u003e\n    Expression builder for \u003ci\u003eAWS.DynamoDB.DocumentClient\u003c/i\u003e\n  \u003c/p\u003e\n  \u003cp align=\"center\"\u003e\n  \t\u003cimg src=\"https://img.shields.io/npm/v/@tuplo/dynoexpr\"\u003e\n  \t\u003ca href=\"https://codeclimate.com/github/tuplo/dynoexpr/test_coverage\"\u003e\n    \u003cimg src=\"https://api.codeclimate.com/v1/badges/3564497cf991d094e2eb/test_coverage\" /\u003e\n  \t\u003c/a\u003e\n  \u003c/p\u003e\n\n\u003c/div\u003e\n\n## Introduction\n\nConverts a plain object to a DynamoDB expression with all variables and names\nreplaced with safe placeholders. It supports `Condition`, `KeyCondition`, `Filter`, `Projection` and `Update` expressions. The resulting expressions can then be used with `AWS.DynamoDB.DocumentClient` requests.\n\n```typescript\nimport dynoexpr from '@tuplo/dynoexpr';\n\nconst params = dynoexpr({\n  KeyCondition: { id: '567' },\n  Condition: { rating: '\u003e 4.5' },\n  Filter: { color: 'blue' },\n  Projection: ['weight', 'size'],\n});\n\n/*\n{\n  KeyConditionExpression: '(#nca40fdf5 = :v8dcca6b2)',\n  ExpressionAttributeValues: {\n    ':v8dcca6b2': '567',\n    ':vc95fafc8': 4.5,\n    ':v792aabee': 'blue'\n  },\n  ConditionExpression: '(#n0f1c2905 \u003e :vc95fafc8)',\n  FilterExpression: '(#n2d334799 = :v792aabee)',\n  ProjectionExpression: '#neb86488e,#n0367c420',\n  ExpressionAttributeNames: {\n    '#nca40fdf5': 'id',\n    '#n0f1c2905': 'rating',\n    '#n2d334799': 'color',\n    '#neb86488e': 'weight',\n    '#n0367c420': 'size'\n  }\n}\n*/\n```\n\n## Install\n\n```bash\n$ npm install @tuplo/dynoexpr\n\n# or with yarn\n$ yarn add @tuplo/dynoexpr\n```\n\n## Usage\n\n### Passing parameters to DocumentClient\n\n```typescript\nconst docClient = new AWS.DynamoDB.DocumentClient();\n\nconst params = dynoexpr({\n  KeyCondition: {\n    HashKey: 'key',\n    RangeKey: 'between 2015 and 2019',\n  },\n});\n\nconst results = await docClient\n  .query({ TableName: 'table', ...params })\n  .promise();\n```\n\n### Using multiple expressions on the same field\n\nYou can use multiple expressions on the same field, by packing them into an array and assigning it to the key with the field's name.\n\n```typescript\nconst params = dynoexpr({\n  Condition: {\n    color: ['attribute_not_exists', 'yellow', 'blue'],\n  },\n  ConditionLogicalOperator: 'OR',\n});\n\n/*\n{\n  ConditionExpression: '(attribute_not_exists(#n2d334799)) OR (#n2d334799 = :v0d81c8cd) OR (#n2d334799 = :v792aabee)',\n  ExpressionAttributeNames: {\n    '#n2d334799': 'color'\n  },\n  ExpressionAttributeValues: {\n    ':v0d81c8cd': 'yellow',\n    ':v792aabee': 'blue'\n  }\n}\n*/\n```\n\n### Using functions\n\n`DynamoDB` supports a number of [functions](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.OperatorsAndFunctions.html#Expressions.OperatorsAndFunctions.Functions) to be evaluated when parsing expressions. You don't need to reference the `path` argument because that's identified by the object's key.\n\n```typescript\nconst params = dynoexpr({\n  Condition: {\n    docs: 'attribute_exists',\n    brand: 'attribute_not_exists',\n    extra: 'attribute_type(NULL)',\n    color: 'begins_with dark',\n    address: 'contains(Seattle)',\n    description: 'size \u003c 20',\n  },\n});\n\n/*\n{\n  ConditionExpression: '(attribute_exists(#nd0a55266)) AND (attribute_not_exists(#n4e5f8507)) AND (attribute_type(#n4a177797,:v64b0a475)) AND (begins_with(#n2d334799,:v1fdc3f67)) AND (contains(#n3af77f77,:v26425a2a)) AND (size(#nb6c8f268) \u003c :vde9019e3)',\n  ExpressionAttributeNames: {\n    '#nd0a55266': 'docs',\n    '#n4e5f8507': 'brand',\n    '#n4a177797': 'extra',\n    '#n2d334799': 'color',\n    '#n3af77f77': 'address',\n    '#nb6c8f268': 'description'\n  },\n  ExpressionAttributeValues: {\n    ':v64b0a475': 'NULL',\n    ':v1fdc3f67': 'dark',\n    ':v26425a2a': 'Seattle',\n    ':vde9019e3': 20\n  }\n}\n*/\n```\n\n### Using multiple expressions on the same request\n\n```typescript\nconst params = dynoexpr({\n  Update: { Sum: 'Sum + 20' },\n  Condition: { Sum: `\u003c 100` },\n});\n\n/*\n{\n  ConditionExpression: '(#n5af617ef \u003c :va88c83b0)',\n  ExpressionAttributeNames: {\n    '#n5af617ef': 'Sum'\n  },\n  ExpressionAttributeValues: {\n    ':va88c83b0': 100,\n    ':vde9019e3': 20\n  },\n  UpdateExpression: 'SET #n5af617ef = #n5af617ef + :vde9019e3'\n}\n*/\n```\n\n### Working with Sets\n\nIf a value is provided as a Set, it will be converted to `DocumentClient.DynamoDbSet`. But `dynoexpr` doesn't include `DocumentClient` so you need to provide it.\n\n```typescript\nimport { DocumentClient } from \"aws-sdk/clients/dynamodb\";\n\nconst params = dynoexpr({\n  DocumentClient,\n  Update: {\n    Color: new Set(['Orange', 'Purple'])\n  },\n})\n\n/*\n{\n  UpdateExpression: 'SET #n8979552b = :v3add0a80',\n  ExpressionAttributeNames: {\n    '#n8979552b': 'Color'\n  },\n  ExpressionAttributeValues: {\n    ':v3add0a80': Set { wrapperName: 'Set', values: [Array], type: 'String' }\n  }\n}\n*/\n```\n\n#### When using UpdateAdd or UpdateDelete, arrays are converted to DynamoDbSet\n\n```typescript\nimport { DocumentClient } from \"aws-sdk/clients/dynamodb\";\n\nconst params = dynoexpr({\n  DocumentClient,\n  UpdateAdd: {\n    Color: ['Orange', 'Purple']\n  }\n})\n\n/*\n{\n  UpdateExpression: 'ADD #ndc9f7295 :v3add0a80',\n  ExpressionAttributeNames: { \n    '#ndc9f7295': 'Color'\n  },\n  ExpressionAttributeValues: {\n    ':v3add0a80': Set { wrapperName: 'Set', values: [Array], type: 'String' }\n  }\n}\n*/\n```\n\n### Keep existing Expressions, AttributeNames and AttributeValues\n\n```typescript\nconst params = dynoexpr({\n  Filter: { color: 'blue' },\n  ProjectionExpression: '#year',\n  ExpressionAttributeNames: {\n    '#year': 'year',\n  },\n});\n\n/*\n{\n  ProjectionExpression: '#year',\n  ExpressionAttributeNames: {\n    '#year': 'year',\n    '#n2d334799': 'color'\n  },\n  FilterExpression: '(#n2d334799 = :v792aabee)',\n  ExpressionAttributeValues: {\n    ':v792aabee': 'blue'\n  }\n}\n*/\n```\n\n### Using object paths on expressions\n\nYou can provide a path to an attribute on a deep object, each node will be escaped.\n\n```typescript\nconst params = dynoexpr({\n  Update: {\n    'foo.bar.baz': 'foo.bar.baz + 1'\n  }\n});\n\n/*\n{\n  ExpressionAttributeNames: {\n    \"#n22f4f0ae\": \"bar\",\n    \"#n5f0025bb\": \"foo\",\n    \"#n82504b33\": \"baz\",\n  },\n  ExpressionAttributeValues: {\n    \":vc823bd86\": 1,\n  },\n  UpdateExpression:\n    \"SET #n5f0025bb.#n22f4f0ae.#n82504b33 = #n5f0025bb.#n22f4f0ae.#n82504b33 + :vc823bd86\",\n}\n*/\n\n```\n\nIf one of the nodes needs to escape some of its characters, use double quotes around it, like this:\n\n```typescript\nconst params = dynoexpr({\n  Update: {\n    'foo.\"bar-cuz\".baz': 'foo.\"bar-cuz\".baz + 1'\n  }\n});\n```\n\n\n### Parsing atomic requests, only expressions will be replaced\n\nYou can pass the whole request parameters to `dynoexpr` - only the expression builders will be replaced.\n\n```typescript\nconst params = dynoexpr({\n  TableName: 'Table',\n  Key: { HashKey: 'key' },\n  ReturnConsumedCapacity: 'TOTAL',\n  KeyCondition: {\n    color: 'begins_with dark',\n  },\n});\n\n/*\n{\n  TableName: 'Table',\n  Key: { HashKey: 'key' },\n  ReturnConsumedCapacity: 'TOTAL',\n  KeyConditionExpression: '(begins_with(#n2d334799,:v1fdc3f67))',\n  ExpressionAttributeNames: {\n    '#n2d334799': 'color'\n  },\n  ExpressionAttributeValues: {\n    ':v1fdc3f67': 'dark'\n  }\n}\n*/\n```\n\n### Parsing Batch requests\n\n```typescript\nconst params = dynoexpr({\n  RequestItems: {\n    'Table-1': {\n      Keys: [{ foo: 'bar' }],\n      Projection: ['a', 'b'],\n    },\n  },\n  ReturnConsumedCapacity: 'TOTAL',\n});\n\n/*\n{\n  \"RequestItems\":{\n    \"Table-1\":{\n      \"Keys\": [{\"foo\":\"bar\"}],\n      \"ProjectionExpression\": \"#na0f0d7ff,#ne4645342\",\n      \"ExpressionAttributeNames\":{\n        \"#na0f0d7ff\": \"a\",\n        \"#ne4645342\": \"b\"\n      }\n    }\n  },\n  \"ReturnConsumedCapacity\": \"TOTAL\"\n}\n*/\n```\n\n### Parsing Transact requests\n\n```typescript\nconst params = dynoexpr({\n  TransactItems: [{\n    Get: {\n      TableName: 'Table-1',\n      Key: { id: 'foo' },\n      Projection: ['a', 'b'],\n    },\n  }],\n  ReturnConsumedCapacity: 'INDEXES',\n});\n\n/*\n{\n  \"TransactItems\": [\n    { \n      \"Get\": {\n        \"TableName\": \"Table-1\",\n        \"Key\": { \"id\": \"foo\" },\n        \"ProjectionExpression\": \"#na0f0d7ff,#ne4645342\",\n        \"ExpressionAttributeNames\": {\n          \"#na0f0d7ff\":\"a\",\n          \"#ne4645342\":\"b\"\n        }\n      }\n    }\n  ],\n  \"ReturnConsumedCapacity\": \"INDEXES\"\n}\n*/\n```\n\n### Type the resulting parameters\n\nThe resulting object is compatible with all `DocumentClient` requests, but if you want to be type-safe, `dynoexpr` accepts a generic type to be applied to the return value.\n\n```typescript\nconst params = dynoexpr\u003cAWS.DocumentClient.UpdateItemInput\u003e({\n  TableName: 'Table',\n  Key: 1,\n  UpdateSet: { color: 'pink' },\n});\n```\n\n## API\n\n### dynoexpr\u0026lt;T\u0026gt;(params)\n\n#### `params`\n\nExpression builder parameters\n\n```typescript\ntype DynamoDbPrimitive = string | number | boolean | object;\ntype DynamoDbValue =\n  | DynamoDbPrimitive\n  | DynamoDbPrimitive[]\n  | Set\u003cDynamoDbPrimitive\u003e;\n\n// all attributes are optional, depending on what expression(s) are to be built\n{\n  Condition: { [key: string]: DynamoDbValue },\n  ConditionLogicalOperator: 'AND' | 'OR',\n\n  KeyCondition: { [key: string]: DynamoDbValue },\n  KeyConditionLogicalOperator: 'AND' | 'OR',\n\n  FilterCondition: { [key: string]: DynamoDbValue },\n  FilterLogicalOperator: 'AND' | 'OR',\n\n  Projection: string[],\n\n  Update: { [key: string]: DynamoDbValue },\n  UpdateAction: 'SET' | 'ADD' | 'DELETE' | 'REMOVE',\n\n  UpdateSet: { [key: string]: DynamoDbValue },\n  UpdateAdd: { [key: string]: DynamoDbValue },\n  UpdateDelete: { [key: string]: DynamoDbValue },\n  UpdateRemove: { [key: string]: DynamoDbValue },\n  \n  DocumentClient: AWS.DynamoDB.DocumentClient\n}\n```\n\n#### Return value\n\nParameters accepted by `AWS.DynamoDB.DocumentClient`\n\n```typescript\n// all attributes are optional depending on the expression(s) being built\n{\n  ConditionExpression: string,\n\n  KeyConditionExpression: string,\n\n  FilterConditionExpression: string,\n\n  ProjectionExpression: string,\n\n  UpdateExpression: string,\n\n  ExpressionAttributeNames: { [key: string]: string },\n  ExpressionAttributeValues: { [key: string]: string },\n}\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruicsh%2Fdynoexpr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fruicsh%2Fdynoexpr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruicsh%2Fdynoexpr/lists"}