{"id":50622246,"url":"https://github.com/the-cookbook/mapper-js","last_synced_at":"2026-06-06T13:02:09.951Z","repository":{"id":50446647,"uuid":"284978149","full_name":"the-cookbook/mapper-js","owner":"the-cookbook","description":"Fast, reliable and intuitive object mapping.","archived":false,"fork":false,"pushed_at":"2021-12-02T16:20:36.000Z","size":2234,"stargazers_count":21,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-09-18T14:17:35.315Z","etag":null,"topics":["data-mapping","dot-notation","mapper","object-mapping"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/the-cookbook.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-08-04T12:49:58.000Z","updated_at":"2025-08-22T10:00:41.000Z","dependencies_parsed_at":"2022-09-05T14:21:23.340Z","dependency_job_id":null,"html_url":"https://github.com/the-cookbook/mapper-js","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/the-cookbook/mapper-js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-cookbook%2Fmapper-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-cookbook%2Fmapper-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-cookbook%2Fmapper-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-cookbook%2Fmapper-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/the-cookbook","download_url":"https://codeload.github.com/the-cookbook/mapper-js/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-cookbook%2Fmapper-js/sbom","scorecard":{"id":877033,"data":{"date":"2025-08-11","repo":{"name":"github.com/the-cookbook/mapper-js","commit":"c76b0b130dbcd94e34321b67ac9e29475dd7d711"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.3,"checks":[{"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":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"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":"Code-Review","score":0,"reason":"Found 0/19 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":"Dangerous-Workflow","score":-1,"reason":"no workflows found","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":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"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":"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":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"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":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v1.1.1 not signed: https://api.github.com/repos/the-cookbook/mapper-js/releases/54510421","Warn: release artifact v1.1.0 not signed: https://api.github.com/repos/the-cookbook/mapper-js/releases/50681553","Warn: release artifact v1.0.1 not signed: https://api.github.com/repos/the-cookbook/mapper-js/releases/30849095","Warn: release artifact v1.0.0 not signed: https://api.github.com/repos/the-cookbook/mapper-js/releases/29286329","Warn: release artifact v1.1.1 does not have provenance: https://api.github.com/repos/the-cookbook/mapper-js/releases/54510421","Warn: release artifact v1.1.0 does not have provenance: https://api.github.com/repos/the-cookbook/mapper-js/releases/50681553","Warn: release artifact v1.0.1 does not have provenance: https://api.github.com/repos/the-cookbook/mapper-js/releases/30849095","Warn: release artifact v1.0.0 does not have provenance: https://api.github.com/repos/the-cookbook/mapper-js/releases/29286329"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"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":"Vulnerabilities","score":0,"reason":"90 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-h5c3-5r3r-rr8q","Warn: Project is vulnerable to: GHSA-rmvr-2pp2-xj38","Warn: Project is vulnerable to: GHSA-xx4v-prfh-6cgc","Warn: Project is vulnerable to: GHSA-c2jc-4fpr-4vhg","Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-fwr7-v2mv-hh25","Warn: Project is vulnerable to: GHSA-cph5-m8f7-6c5x","Warn: Project is vulnerable to: GHSA-wf5p-g6vw-rhxx","Warn: Project is vulnerable to: GHSA-jr5f-v2jv-69x6","Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-w8qv-6jwh-64r5","Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x","Warn: Project is vulnerable to: GHSA-7gc6-qh9x-w6h8","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-3wcq-x3mq-6r9p","Warn: Project is vulnerable to: GHSA-rv95-896h-c2vc","Warn: Project is vulnerable to: GHSA-qw6h-vgh9-j6wx","Warn: Project is vulnerable to: GHSA-74fj-2j2h-c42q","Warn: Project is vulnerable to: GHSA-pw2r-vq6v-hr8c","Warn: Project is vulnerable to: GHSA-jchw-25xp-jwwc","Warn: Project is vulnerable to: GHSA-cxjh-pqwp-8mfp","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-4q6p-r6v2-jvc5","Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6","Warn: Project is vulnerable to: GHSA-765h-qjxv-5f44","Warn: Project is vulnerable to: GHSA-f2jv-r9rf-7988","Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj","Warn: Project is vulnerable to: GHSA-c7qv-q95q-8v27","Warn: Project is vulnerable to: GHSA-4www-5p9h-95mh","Warn: Project is vulnerable to: GHSA-9gqv-wp59-fq42","Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37","Warn: Project is vulnerable to: GHSA-78xj-cgh5-2h22","Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-76p3-8jx3-jpfq","Warn: Project is vulnerable to: GHSA-3rfm-jhwj-7488","Warn: Project is vulnerable to: GHSA-hhq3-ff78-jv3g","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-7wpw-2hjm-89gp","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-w7rc-rwvf-8q5r","Warn: Project is vulnerable to: GHSA-r683-j2x4-v87g","Warn: Project is vulnerable to: GHSA-5rrq-pxf6-6jx5","Warn: Project is vulnerable to: GHSA-8fr3-hfg3-gpgp","Warn: Project is vulnerable to: GHSA-gf8q-jrpm-jvxq","Warn: Project is vulnerable to: GHSA-2r2c-g63r-vccr","Warn: Project is vulnerable to: GHSA-cfm4-qjh2-4765","Warn: Project is vulnerable to: GHSA-x4jg-mjrx-434g","Warn: Project is vulnerable to: GHSA-76c9-3jph-rj3q","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-rhx6-c78j-4q9w","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg","Warn: Project is vulnerable to: GHSA-76p7-773f-r4q5","Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p","Warn: Project is vulnerable to: GHSA-g4rg-993r-mgx7","Warn: Project is vulnerable to: GHSA-4rq4-32rv-6wp6","Warn: Project is vulnerable to: GHSA-64g7-mvw6-v9qj","Warn: Project is vulnerable to: GHSA-4wf5-vphf-c2xc","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-jgrx-mgxx-jf9v","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-7p7h-4mm5-852v","Warn: Project is vulnerable to: GHSA-38fc-wpqx-33j7","Warn: Project is vulnerable to: GHSA-662x-fhqg-9p8v","Warn: Project is vulnerable to: GHSA-394c-5j6w-4xmx","Warn: Project is vulnerable to: GHSA-78cj-fxph-m83p","Warn: Project is vulnerable to: GHSA-fhg7-m89q-25r3","Warn: Project is vulnerable to: GHSA-hc6q-2mpp-qw7j","Warn: Project is vulnerable to: GHSA-4vvj-4cpr-p986","Warn: Project is vulnerable to: GHSA-wr3j-pwj9-hqq6","Warn: Project is vulnerable to: GHSA-4v9v-hfq4-rm2v","Warn: Project is vulnerable to: GHSA-9jgg-88mc-972h","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-6fc8-4gx4-v693","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q"],"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-24T06:26:05.546Z","repository_id":50446647,"created_at":"2025-08-24T06:26:05.546Z","updated_at":"2025-08-24T06:26:05.546Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33983046,"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-06T02:00:07.033Z","response_time":107,"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":["data-mapping","dot-notation","mapper","object-mapping"],"created_at":"2026-06-06T13:02:03.420Z","updated_at":"2026-06-06T13:02:09.939Z","avatar_url":"https://github.com/the-cookbook.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @cookbook/mapper-js\n\n\u003e Fast, reliable and intuitive object mapping.\n\n[![NPM Version][npm-image]][npm-url]\n[![CI Status][circleci-image]][circleci-url]\n[![Downloads Stats][npm-downloads]][npm-url]\n[![GitHub stars][stars-image]][stars-url]\n[![Known Vulnerabilities][vulnerabilities-image]][vulnerabilities-url]\n[![GitHub issues][issues-image]][issues-url]\n[![Awesome][awesome-image]][awesome-url]\n[![install size][install-size-image]][install-size-url]\n[![gzip size][gzip-size-image]][gzip-size-url]\n\n![](mapper-js.png)\n\n## Demo\n\nPlay around with _mapper-js_ and experience **the magic**!\n\n[![Edit @cookbook/mapper-js](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/cookbookmapper-js-jo7gf?fontsize=14\u0026hidenavigation=1\u0026theme=dark)\n\n## Installation\n\n```sh\nnpm install @cookbook/mapper-js --save\n#or\nyarn add @cookbook/mapper-js\n```\n\n## How to use\n\n### 1) Know the structure from your source data\n\nBefore we start, it is essential that we know your data structure\nso we can map it accordingly.\n\nFor this demo case, let's assume that we have the following object:\n\n```js\nconst source = {\n  person: {\n    name: {\n      firstName: 'John',\n      lastName: 'Doe',\n    },\n    age: 32,\n    drinks: ['beer', 'whiskey'],\n    address: [\n      {\n        street: 'Infinite Loop',\n        city: 'Cupertino',\n        state: 'CA',\n        postalCode: 95014,\n        country: 'United States',\n      },\n      {\n        street: '1600 Amphitheatre',\n        city: 'Mountain View',\n        state: 'CA',\n        postalCode: 94043,\n        country: 'United States',\n      },\n    ],\n  },\n};\n```\n\n### 2) Create your mapping using dot notation\n\nAt this step, we need to create our `mapping` against our data `source`.\n\nWe will be using `dot notation` to create our `final structure`.\n\n\u003e For more info about `dot notation` API, check out the [documentation](https://github.com/the-cookbook/dot-notation)\n\nWith `mapper`, it is possible to `get` _one_ or _several_ values from our `source`\nand even `transform` it in the way we need.\n\nFor that, `map()` accepts `single dot notation` path or\n`an array of dot notation paths`. E.g.: `map('person.name.firstName')`, `map([person.name.firstName, person.name.lastName]);`'\n\nThose values can be _transformed_ by using the `.transform()` method, which expects a `function` as argument and provides\nthe selected values as array in the `parameter`.\n\n\u003e For more information about the usage, check the [API Documentation](#api-documentation).\n\nNow let's create our `mapping`!\n\n```js\n// mapping.ts\nimport mapper from '@cookbook/mapper-js';\n\n...\n\nconst mapping = mapper((map) =\u003e ({\n  'person.name': map('person.name')\n                .transform(({ firstName, lastName }) =\u003e `${firstName} ${lastName}`)\n                .value,\n  'person.lastName': map('person.lastName').value,\n  'person.isAllowedToDrive': map(['person.age', 'person.drinks'])\n  \t\t\t\t.transform((age, drinks) =\u003e age \u003e 18 \u0026\u0026 drinks.includes('soft-drink'))\n  \t\t\t\t.value,\n  address: map('person.address').value,\n  defaultAddress: map('person.address[0]').value,\n}));\n```\n\n### 3) Create your mapped object\n\n```js\nimport mapping from './mapping';\n...\n\nconst result = mapping(source);\n/* outputs\n{\n  person: {\n    name: 'John Doe',\n    isAllowedToDrive: false,\n  },\n  address: [\n    {\n      street: 'Infinite Loop',\n      city: 'Cupertino',\n      state: 'CA',\n      postalCode: 95014,\n      country: 'United States'\n    },\n    ...\n  ],\n  defaultAddress: {\n    street: 'Infinite Loop',\n    city: 'Cupertino',\n    state: 'CA',\n    postalCode: 95014,\n    country: 'United States'\n  }\n}\n*/\n\n```\n\n# API Documentation\n\n## mapper\n\n**Type:** `function()`\n**Parameter:** `mapping: Mapping`\n**Return:** `\u003cT\u003e(source: object | object[], options?: Options) =\u003e T extends [] ? T[] : T`,\n**Signature:** `(mapping: Mapping) =\u003e \u003cT\u003e(source: object | object[], options?: Options) =\u003e T extends [] ? T[] : T`\n\n**Description:**\n\n`mapper()` is the main method and responsible for mapping the _values_ from your _data source_ against the _mapping instructions_.\nIt accepts `dot notation` path(s) as `key(s)`.\n\nExample:\n\n```ts\n// raw definition\nconst mapping = mapper((map) =\u003e ({\n    ...\n}));\n\n// with map() query\nconst mapping = mapper((map) =\u003e ({\n  'employee.name': map('person.name.firstName').value,\n  'employee.age': map('person.name.age').value,\n  'employee.address': map('person.address').value,\n}));\n```\n\nAs a result from the above implementation, `mapper()` return a new `function` to map and compile your _source data_ against your _mapping_.\n\nIt accepts an extra (_optional_) argument defining the [_global mapping options_](#mapper-options).\n\nExample:\n\n```ts\n...\n\nmapping(source, options);\n\n/* outputs\n{\n  employee: {\n    name: 'John',\n    age: 32,\n    address: [\n      {\n        street: 'Infinite Loop',\n        city: 'Cupertino',\n        state: 'CA',\n        postalCode: 95014,\n        country: 'United States'\n      },\n      ...\n    ],\n  },\n}\n*/\n```\n\n---\n\n## map\n\n**Type:** `function`\n**Parameter:** `keys: string | string[], options?: Options`\n**Return:** `MapMethods\u003cT\u003e`,\n**Signature:** `\u003cT = unknown\u003e(keys: string | string[], options?: Options) =\u003e MapMethods\u003cT\u003e`\n\n**Description:**\n\n`root` method retrieves values from your _source data_ using `dot notation` path, it accepts a string or array of string.\n\nIt accepts an extra (_optional_) argument to define the [_mapping options for current entry_](#mapper-options), _overriding_ the _global mapping options_.\n\nExample:\n\n```ts\nmap('person.name.firstName');\nmap(['person.name.firstName', 'person.name.lastName']);\nmap(['person.name.firstName', 'person.name.lastName'], options);\n```\n\n#### `transform`\n\n**Type:** `function`\n**Parameter:** `...unknown[]`\n**Return:** `unknown | unknown[]`,\n**Signature:** `(...args: unknown[]) =\u003e unknown | unknown[]`\n\n**Description:**\n\n`.transform` method provides you the ability to _transform_ the retrieved value(s) from `map()` according to your needs, and for that, it expects a return value.\n\n`.transform` provides you as _parameter_, the retrieved value(s) in the **same order** as defined in the `map()` method, otherwise\n\nExample:\n\n```ts\n// single value\nmap('person.name.firstName').transform((firstName) =\u003e firstName.toLoweCase());\n\n// multiple values\nmap(['person.name.firstName', 'person.name.lastName']).transform((firstName, lastName) =\u003e `${firstName} ${lastName}`);\n```\n\n#### `value`\n\n**Type:** `readonly`\n**Return:** `T`\n**Description:**\n\n`.value` returns the value of your `dot notation` query. If transformed, returns the transformed value.\n\nExample:\n\n```ts\n// single value\nmap('person.name.firstName').transform((firstName) =\u003e firstName.toLoweCase()).value;\n\n// multiple values\nmap(['person.name.firstName', 'person.name.lastName']).transform((firstName, lastName) =\u003e `${firstName} ${lastName}`)\n  .value;\n```\n\n## Mapper Options\n\n### defaults\n\n```js\n{\n  omitNullUndefined: false,\n  omitStrategy: () =\u003e false,\n}\n```\n\n### Details\n\n**`omitNullUndefined`**\n\n**Type:** `boolean`\n**default value:** `false`\n\n**Description:**\n\nRemoves `null` or `undefined` entries from the _mapped_ object.\n\nExample:\n\n```ts\n/* source object\n{\n  person: {\n    name: 'John',\n    lastName: 'Doe',\n    age: 32,\n  },\n}\n*/\nconst mapping = mapper((map) =\u003e ({\n  name: map('person.name').value,\n  age: map('person.age').value,\n  // source doesn't have property 'address',\n  // therefore will return \"undefined\"\n  address: map('person.address').value,\n}));\n\nmapping(source, { omitNullUndefined: true });\n/* outputs \n{\n  name: 'John',\n  age: 32,\n}\n*/\n```\n\n**`omitStrategy`**\n\n**Type:** `function`\n**Parameter:** `value: unknown | unknown[]`\n**Return:** `boolean`\n**Signature:** `(value: unknown | unknown[]) =\u003e boolean`\n\n**Description:**\n\nDefines a _custom strategy_ to omit (_suppress_) entries from the _mapped object_.\n\nExample:\n\n```tsx\n/* source object\n{\n  person: {\n    name: 'John',\n    lastName: 'Doe',\n    age: 32,\n    address: {\n      street: 'Infinite Loop',\n      city: 'Cupertino',\n      state: 'CA',\n      postalCode: 95014,\n      country: 'United States',\n    }\n  },\n}\n*/\n\nconst customOmitStrategy = (address: Record\u003cstring, string\u003e): boolean =\u003e address \u0026\u0026 address.city === 'Cupertino';\n\nconst mapping = mapper((map) =\u003e ({\n  name: map('person.name').value,\n  age: map('person.age').value,\n  address: map('person.address').value,\n}));\n\nmapping(source, { omitStrategy: customOmitStrategy });\n/* outputs \n{\n  name: 'John',\n  age: 32,\n}\n*/\n```\n\n\u003c!-- Markdown link \u0026 img dfn's --\u003e\n\n[npm-image]: https://img.shields.io/npm/v/@cookbook/mapper-js.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/@cookbook/mapper-js\n[npm-downloads]: https://img.shields.io/npm/dm/@cookbook/mapper-js.svg?style=flat-square\n[circleci-image]: https://circleci.com/gh/the-cookbook/mapper-js.svg?style=svg\n[circleci-url]: https://circleci.com/gh/the-cookbook/mapper-js\n[stars-image]: https://img.shields.io/github/stars/the-cookbook/mapper-js.svg\n[stars-url]: https://github.com/the-cookbook/mapper-js/stargazers\n[vulnerabilities-image]: https://snyk.io/test/github/the-cookbook/mapper-js/badge.svg\n[vulnerabilities-url]: https://snyk.io/test/github/the-cookbook/mapper-js\n[issues-image]: https://img.shields.io/github/issues/the-cookbook/mapper-js.svg\n[issues-url]: https://github.com/the-cookbook/mapper-js/issues\n[awesome-image]: https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg\n[awesome-url]: https://github.com/the-cookbook/mapper-js\n[install-size-image]: https://packagephobia.now.sh/badge?p=@cookbook/mapper-js\n[install-size-url]: https://packagephobia.now.sh/result?p=@cookbook/mapper-js\n[gzip-size-image]: http://img.badgesize.io/https://unpkg.com/@cookbook/mapper-js/lib/mapper.min.js?compression=gzip\n[gzip-size-url]: https://unpkg.com/@cookbook/mapper-js/lib/mapper.min.js\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthe-cookbook%2Fmapper-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthe-cookbook%2Fmapper-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthe-cookbook%2Fmapper-js/lists"}