• Stars
    star
    116
  • Rank 303,894 (Top 6 %)
  • Language
    JavaScript
  • Created over 9 years ago
  • Updated over 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

🐏 Debugging for Ramda.

ramda-debug Build Status npm version

🐏 Debugging for Ramda.

Aims to ease observability when coding in a point-free programming style hopefully making it easier to spot errors.

See also tap-debug for a more human-readable debug function.

var R = require('ramda');
var look = require('ramda-debug');

R = look.wrap(R);

var getTypes = look.fov(function getTypes(fruits) {
  var getType = R.prop('type');
  var mapTypes = R.map(getType);

  return mapTypes(fruits);
});

getTypes([ { 'type': 'fruit' } ]);

Example The 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.

Usage

By default debugging is not enabled.

look(fn)

A function can be passed in and a wrapped function that can emit debug information on execution will be returned.

Any function can be wrapped using this.

wrap(library)

An object of functions may be passed in and an object or wrapped functions will be returned.

Any object of functions can be wrapped using this and not just Ramda.

fov(fn)

This 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.

enable(enabled)

Switch debugging to this boolean value.

on()

Switch debugging on.

off()

Switch debugging off.

Installation

npm install [--save] ramda-debug;

More Repositories

1

scrape-twitter

🐦 Access Twitter data without an API key. [DEPRECATED]
JavaScript
176
star
2

teller-cli

🏦 Banking for your command line [DEPRECATED]
Rust
61
star
3

jstruct

💡 Quick and easy JSON transformations.
JavaScript
49
star
4

express-keenio

📊 Rapidly install analytics with a middleware.
JavaScript
42
star
5

redux-saga-helpers

🚑 Error-handling for redux-saga.
JavaScript
23
star
6

tap-debug

🍺 Debug on tap.
JavaScript
17
star
7

xstate-awaitable-send

Fire an event into an XState `Machine` and then wait for it to resolve.
TypeScript
12
star
8

neo4j-simple

🔴➖🔵 Simple nodes, relations, queries.
JavaScript
10
star
9

react-redux-wizard

✨ A simple wizard for React.
JavaScript
10
star
10

ietf-language-tag-regex

Regular expressions for matching IETF language tags (BCP 47)
JavaScript
8
star
11

monitor-head-stream

💦 Monitor the head of a stream.
JavaScript
7
star
12

conventional-component

🏴 Hoist the state of React components into Redux.
JavaScript
6
star
13

graphviz-config-template

🎨 Templates as visual graph configuration.
JavaScript
6
star
14

micrograd-rs

Well-commented `micrograd` implementation in Rust.
Rust
5
star
15

modern-node-app

A modern Node.js backend
TypeScript
4
star
16

react-redux-simple-modal

🔱 A simple modal switcher for React.
JavaScript
3
star
17

dotcom

New blog
CSS
3
star
18

k8s-argo-parallel-aggregate-workflow

Given a set of files, we run computations on them in parallel, and finally generate an aggregate result.
3
star
19

learning-haskell

Just using this to work through some tutorials in my spare time...
Haskell
3
star
20

then-while

Call an (a)sync function until an (a)sync predicate returns false.
JavaScript
3
star
21

UIScrollView-StretchyHeader-Example

Programmatic control of Autolayout using iOS8 and Swift.
Swift
3
star
22

2023-interview-prep

🔑🔑🔑 LeetCode, CSES, CodeSignal
Python
2
star
23

cracking-the-coding-interview

🤯 Cracking the Coding Interview in Rust.
Rust
2
star
24

git-in-git

Shell
2
star
25

eventual-schema

Combine objects to generate schemas.
JavaScript
2
star
26

catch-to

Catch errors and declaratively map them to other errors or values.
JavaScript
2
star
27

mu

[shelved] Social release calendar with a music focus.
CSS
1
star
28

get-object-paths

Transforms collections describing paths into arrays of paths.
JavaScript
1
star
29

twitter-force-directed-graph

Clojure
1
star
30

component-horizontal-stacked-bar

A horizontal stacked bar component created with React and d3
JavaScript
1
star
31

chalk-mobile

TypeScript
1
star
32

sebinsua

`README.md`
1
star
33

rollup-resolve-externalised-dynamic-imports

Demonstrating a bug when resolving the module ids of externalised dynamic imports in [email protected]
JavaScript
1
star
34

advent-of-code-2020

Rust
1
star
35

test-react-spring

Finding a bug in `react-spring`
TypeScript
1
star
36

connect-friendwares

A connect helper so that middlewares can see their friends.
JavaScript
1
star
37

scrape-dojo

Scrape Dojo before it goes the way of the Dodo
TypeScript
1
star
38

test-review-notebooks

Test of ReviewNB.
Jupyter Notebook
1
star
39

twitter-market

Ignore for now.
Python
1
star
40

2019-interview-prep

🤯 Random interview prep.
Rust
1
star