{"id":15434010,"url":"https://github.com/sebinsua/ramda-debug","last_synced_at":"2025-04-16T05:57:21.825Z","repository":{"id":31384572,"uuid":"34947668","full_name":"sebinsua/ramda-debug","owner":"sebinsua","description":":ram: Debugging for Ramda.","archived":false,"fork":false,"pushed_at":"2016-05-19T23:29:56.000Z","size":37,"stargazers_count":116,"open_issues_count":8,"forks_count":3,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-01-07T09:04:43.679Z","etag":null,"topics":["debug","functional-programming","ramda","signature"],"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/sebinsua.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":"2015-05-02T12:53:57.000Z","updated_at":"2024-07-17T02:23:14.000Z","dependencies_parsed_at":"2022-08-17T18:31:09.213Z","dependency_job_id":null,"html_url":"https://github.com/sebinsua/ramda-debug","commit_stats":null,"previous_names":["sebinsua/ramda-look"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebinsua%2Framda-debug","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebinsua%2Framda-debug/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebinsua%2Framda-debug/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebinsua%2Framda-debug/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sebinsua","download_url":"https://codeload.github.com/sebinsua/ramda-debug/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249205728,"owners_count":21229984,"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":["debug","functional-programming","ramda","signature"],"created_at":"2024-10-01T18:36:40.621Z","updated_at":"2025-04-16T05:57:21.803Z","avatar_url":"https://github.com/sebinsua.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ramda-debug [![Build Status](https://travis-ci.org/sebinsua/ramda-debug.png)](https://travis-ci.org/sebinsua/ramda-debug) [![npm version](https://badge.fury.io/js/ramda-debug.svg)](https://www.npmjs.com/package/ramda-debug)\n\u003e :ram: Debugging for Ramda.\n\nAims to ease observability when coding in a [point-free programming style](http://en.wikipedia.org/wiki/Tacit_programming) hopefully making it easier to spot errors.\n\nSee also [tap-debug](https://github.com/sebinsua/tap-debug) for a more human-readable debug function. \n\n```javascript\nvar R = require('ramda');\nvar look = require('ramda-debug');\n\nR = look.wrap(R);\n\nvar getTypes = look.fov(function getTypes(fruits) {\n  var getType = R.prop('type');\n  var mapTypes = R.map(getType);\n\n  return mapTypes(fruits);\n});\n\ngetTypes([ { 'type': 'fruit' } ]);\n```\n\n![Example](http://i.imgur.com/5IVzjc3.png)\nThe type signatures emitted are type signatures constructed from runtime usage of a function. The intention is that if a function is being used incorrectly the type signature will also be incorrect and that this can be noticed. Unfortunately it means that polymorphism will not be apparent.\n\n## Usage\n\nBy default debugging is *not* enabled.\n\n#### `look(fn)`\n\nA function can be passed in and a wrapped function that can emit debug information on execution will be returned.\n\nAny function can be wrapped using this.\n\n#### `wrap(library)`\n\nAn object of functions may be passed in and an object or wrapped functions will be returned.\n\nAny object of functions can be wrapped using this and not just Ramda.\n\n#### `fov(fn)`\n\nThis returns a function that provides a field of view within a function by proxying into `fn` and switching debugging on while it is being executed.\n\n#### `enable(enabled)`\n\nSwitch debugging to this boolean value.\n\n#### `on()`\n\nSwitch debugging on.\n\n#### `off()`\n\nSwitch debugging off.\n\n## Installation\n```shell\nnpm install [--save] ramda-debug;\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsebinsua%2Framda-debug","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsebinsua%2Framda-debug","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsebinsua%2Framda-debug/lists"}