{"id":24552911,"url":"https://github.com/eckelon/convenient-fp-utils","last_synced_at":"2025-10-15T04:03:11.210Z","repository":{"id":53758366,"uuid":"329659732","full_name":"eckelon/convenient-fp-utils","owner":"eckelon","description":"module that wraps different fp libraries together and adds some convenient functions","archived":false,"fork":false,"pushed_at":"2021-03-15T18:18:38.000Z","size":8,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-15T23:13:45.832Z","etag":null,"topics":["functional-programming","javascript","library","module","sanctuary"],"latest_commit_sha":null,"homepage":"https://github.com/eckelon/convenient-fp-utils","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/eckelon.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":"2021-01-14T15:43:25.000Z","updated_at":"2021-03-23T12:05:29.000Z","dependencies_parsed_at":"2022-09-14T17:22:57.160Z","dependency_job_id":null,"html_url":"https://github.com/eckelon/convenient-fp-utils","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/eckelon%2Fconvenient-fp-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eckelon%2Fconvenient-fp-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eckelon%2Fconvenient-fp-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eckelon%2Fconvenient-fp-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eckelon","download_url":"https://codeload.github.com/eckelon/convenient-fp-utils/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249167448,"owners_count":21223506,"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":["functional-programming","javascript","library","module","sanctuary"],"created_at":"2025-01-23T01:33:32.879Z","updated_at":"2025-10-15T04:03:06.162Z","avatar_url":"https://github.com/eckelon.png","language":"JavaScript","readme":"# convenient-fp-utils *1.0.0*\n\n\u003e module that wraps different fp libraries together and adds some convenient functions\n\n\n### src/index.js\n\n\n#### module.exports() \n\nConvenient FP Utils is a module that wraps different fp libraries together.\n\n**Why not ramda or lodash/fp?**\n\nI like ramda and lodash/fp; they're cool in most situations, but despite they help us to write clean and composable code, this code is not type-safe. Sanctuary allows us to write type-safe code with its functions, and with sanctuary-def we're able to write type-safe functions.\n\n\n\n\n\n\n##### Returns\n\n\n- `object`  all the convenient-fp-utils utilities\n\n\n\n\n### src/utils.js\n\n\n#### module.exports(dependencies) \n\nThis object offers a curated set of composable functions that we usually use.\n\n\n\n\n##### Parameters\n\n| Name | Type | Description |  |\n| ---- | ---- | ----------- | -------- |\n| dependencies | `object`  | object containing the sanctuary (S) dependency. | \u0026nbsp; |\n\n\n\n\n##### Returns\n\n\n- `object`  utils functions.\n\n\n\n#### tap() \n\ntap :: (a -\u003e Any) -\u003e a -\u003e a\n\nRuns the given function with the supplied object, then returns the object.\n\n\n\n\n\n\n##### Returns\n\n\n- `Any`  returns what the function passed returns.\n\n\n\n#### noop() \n\nThis is the 'no operation' function. It just returns undefined.\n\n\n\n\n\n\n##### Returns\n\n\n- `Undefined`  \n\n\n\n#### T() \n\nT :: Boolean b =\u003e a -\u003e b\n\nAlways returns true\n\n\n\n\n\n\n##### Returns\n\n\n- `Boolean`  \n\n\n\n#### F() \n\nF :: Boolean b =\u003e a -\u003e b\n\nAlways returns false\n\n\n\n\n\n\n##### Returns\n\n\n- `Boolean`  \n\n\n\n#### zipObj() \n\nzipObj :: Array -\u003e Array -\u003e Object\n\nCreates a new object out of a list of keys and a list of values. Key/value pairing is truncated to the length of the shorter of the two lists.\n\n```\nzipObj(['a', 'b', 'c'])([1, 2, 3]); //=\u003e {a: 1, b: 2, c: 3}\n```\n\n\n\n\n\n\n##### Returns\n\n\n- `Object`  \n\n\n\n#### pResolve() \n\npResolve :: a -\u003e Promise\n\nIt returns a promise that resolves with the given param\n\n\n\n\n\n\n##### Returns\n\n\n- `Promise`  \n\n\n\n#### pReject() \n\npReject :: a -\u003e Promise\n\nIt returns a promise that rejects with the given param\n\n\n\n\n\n\n##### Returns\n\n\n- `Promise`  \n\n\n\n#### map2() \n\nmap2 :: Functor f =\u003e (a -\u003e b) -\u003e f a -\u003e f b\n\nTakes a function and a functor with another functor inside, applies the function to each of the deepest functor's values, and returns a functor of the same shape than the top functor.\n\n\n\n\n\n\n##### Returns\n\n\n- `Functor`  \n\n\n\n#### map3() \n\nmap2 :: Functor f =\u003e (a -\u003e b) -\u003e f a -\u003e f b\n\nTakes a function and a functor with two nested functors inside, applies the function to each of the deepest functor's values, and returns a functor of the same shape than the top functor.\n\n\n\n\n\n\n##### Returns\n\n\n- `Functor`  \n\n\n\n#### allPass() \n\nallPass :: Any a =\u003e Boolean b =\u003e  [(a -\u003e b)] -\u003e (a -\u003e b)\n\nTakes a list of predicates and returns a predicate that returns true for a given list of arguments if every one of the provided predicates is satisfied by those arguments. False otherwise.\n\n\n\n\n\n\n##### Returns\n\n\n- `Boolean`  \n\n\n\n#### anyPass() \n\nanyPass :: Any a =\u003e Boolean b =\u003e  [(a -\u003e b)] -\u003e (a -\u003e b)\n\nTakes a list of predicates and returns a predicate that returns true for a given list of arguments if at least one of the provided predicates is satisfied by those arguments. False otherwise.\n\n\n\n\n\n\n##### Returns\n\n\n- `Boolean`  \n\n\n\n#### parallelAp() \n\nparallelAp :: Function f =\u003e Function g =\u003e Any a =\u003e Array(a)\n\nTakes two functions and applies them to the same given value, returning an array of results\n\n\n\n\n\n\n##### Returns\n\n\n- `Array`  \n\n\n\n#### includes() \n\nincludes :: Any =\u003e Array Any =\u003e Boolean\n\nTakes a value and an array and returns True if the value is contained in the array. False otherwise.\n\n\n\n\n\n\n##### Returns\n\n\n- `Boolean`  \n\n\n\n#### getEq() \n\ngetEq :: Function =\u003e String =\u003e Any =\u003e Object =\u003e Maybe Boolean\n\nReturns true if the specified object property is equal, in S.equals terms, to the given value; false otherwise.\n\n\n\n\n\n\n##### Returns\n\n\n-  Boolean\n\n\n\n#### findEq() \n\nfindEq :: Function Boolean =\u003e String =\u003e Any =\u003e Array Object =\u003e Maybe Boolean\n\nTakes a predicate, a field name, a value and an object array and returns Just the leftmost object of the array which field equals the desired value; Nothing otherwise.\n\n\n\n\n\n\n##### Returns\n\n\n-  Maybe\n\n\n\n#### pluck() \n\npluck :: Function Boolean =\u003e String =\u003e Array Maybe Any\n\nReturns a new list by plucking the same named property off all objects in the list supplied.\n\n\n\n\n\n\n##### Returns\n\n\n-  Array\n\n\n\n\n### src/http.js\n\n\n#### module.exports(dependencies) \n\nThis object offers a curated set of composable functions to make http-requests with fetch API\n\n\n\n\n##### Parameters\n\n| Name | Type | Description |  |\n| ---- | ---- | ----------- | -------- |\n| dependencies | `object`  | object containing the fluture and sanctuary (S) dependencies. | \u0026nbsp; |\n\n\n\n\n##### Returns\n\n\n- `object`  http functions.\n\n\n\n#### doGet() \n\ndoGet :: Promise b =\u003e a -\u003e b\n\nIt makes a GET http request and returns a promise result\n\n\n\n\n\n\n##### Returns\n\n\n- `Promise`  \n\n\n\n#### doPost() \n\ndoPost :: Promise c =\u003e a -\u003e b -\u003e c\n\nIt makes a POST http request with data as body, and returns a promise result\n\n\n\n\n\n\n##### Returns\n\n\n- `Promise`  \n\n\n\n\n*Documentation generated with [doxdox](https://github.com/neogeek/doxdox).*\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feckelon%2Fconvenient-fp-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feckelon%2Fconvenient-fp-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feckelon%2Fconvenient-fp-utils/lists"}