{"id":20021688,"url":"https://github.com/s-bhalode/sparkxcel","last_synced_at":"2025-07-14T20:37:01.598Z","repository":{"id":217492750,"uuid":"744012158","full_name":"s-bhalode/sparkXcel","owner":"s-bhalode","description":null,"archived":false,"fork":false,"pushed_at":"2024-03-22T17:54:25.000Z","size":28,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-09T03:06:56.596Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/s-bhalode.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}},"created_at":"2024-01-16T13:09:25.000Z","updated_at":"2024-02-20T11:02:56.000Z","dependencies_parsed_at":"2024-03-21T05:47:22.845Z","dependency_job_id":null,"html_url":"https://github.com/s-bhalode/sparkXcel","commit_stats":null,"previous_names":["s-bhalode/sparkxcel"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/s-bhalode/sparkXcel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s-bhalode%2FsparkXcel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s-bhalode%2FsparkXcel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s-bhalode%2FsparkXcel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s-bhalode%2FsparkXcel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/s-bhalode","download_url":"https://codeload.github.com/s-bhalode/sparkXcel/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s-bhalode%2FsparkXcel/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265344874,"owners_count":23750570,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-13T08:37:45.145Z","updated_at":"2025-07-14T20:37:01.569Z","avatar_url":"https://github.com/s-bhalode.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DTO (Data Transfer Objects)\n\n\n## Overview\n\nThis library was created to solve the problem of taking a data model from a datasource and needing to remove, add, merge, or translate the data model to a similar or completely different object. \n\nThere are similar libraries in other languages (DataMapper, DTO(C#), etc). I could never find a solution that allowed me to quickly and easily utilize a couple of different approaches: *projection*, *translation*, and *merging*.\n\n## Getting Started\n\n\n## Projection\nThere are two simple ways to project (like a SQL SELECT statement) or simplify an object. I found myself deleting the properties on the object, or using libraries such as lodash to restrict the output. I decided to use Lazy.js for performance reasons.\n\n### Only\n\nGiven an array of property names, the resulting object will only contain the supplied properties.\n\n**Example**\n\n```js\nlet Dto = require('dto');\nlet model = { name: { first: 'Simran', last: 'Bhalode'}, age: 21, gender: 'Female'};\n\nlet result = Dto.take.only(model, ['age', 'gender']);\n// result = { age: 21, gender: 'Female' }\n```\n\n### Without\n\nGiven an array of property names, the resulting object will remove any properties supplied.\n\n**Example**\n\n```js\nlet Dto = require('dto');\nlet model = { name: { first: 'Simran', last: 'Bhalode'}, age: 21, gender: 'Female'};\n\nlet result = Dto.take.without(model, ['name']);\n// result = { age: 21, gender: 'Female' }\n```\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs-bhalode%2Fsparkxcel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fs-bhalode%2Fsparkxcel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs-bhalode%2Fsparkxcel/lists"}