{"id":13415055,"url":"https://github.com/franciscotln/callbag-map-when","last_synced_at":"2025-03-14T22:32:40.299Z","repository":{"id":30759785,"uuid":"125717811","full_name":"franciscotln/callbag-map-when","owner":"franciscotln","description":"Callbag operator that maps over values that satisfies a predicate. AKA filterMap","archived":false,"fork":false,"pushed_at":"2022-04-09T06:00:26.000Z","size":22,"stargazers_count":5,"open_issues_count":3,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-09T09:47:28.503Z","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/franciscotln.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}},"created_at":"2018-03-18T11:26:47.000Z","updated_at":"2019-08-01T18:43:31.000Z","dependencies_parsed_at":"2022-08-07T16:01:26.982Z","dependency_job_id":null,"html_url":"https://github.com/franciscotln/callbag-map-when","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/franciscotln%2Fcallbag-map-when","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/franciscotln%2Fcallbag-map-when/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/franciscotln%2Fcallbag-map-when/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/franciscotln%2Fcallbag-map-when/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/franciscotln","download_url":"https://codeload.github.com/franciscotln/callbag-map-when/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221513955,"owners_count":16835748,"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-07-30T21:00:42.389Z","updated_at":"2024-10-26T08:31:00.559Z","avatar_url":"https://github.com/franciscotln.png","language":"JavaScript","funding_links":[],"categories":["Table Contents"],"sub_categories":["Transformation operators"],"readme":"# callbag-map-when\n\nCallbag operator that applies a transformation function only to items that satisfy the predicate function. Works as filter() followed by map() on either pullable or listenable sources.\n\n`npm install callbag-map-when`\n\n## Example\n\n```js\nconst mapWhen = require('callbag-map-when');\nconst forEach = require('callbag-for-each');\nconst fromIter = require('callbag-from-iter');\nconst pipe = require('callbag-pipe');\n\npipe(\n  fromIter([1, 2, 3, 4]),\n  mapWhen(n =\u003e n % 2 === 0, n =\u003e n * 10),\n  forEach((n) =\u003e {\n    console.log(n); // 20\n  })                // 40\n);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffranciscotln%2Fcallbag-map-when","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffranciscotln%2Fcallbag-map-when","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffranciscotln%2Fcallbag-map-when/lists"}