Skip to content

Commit

Permalink
germs settings (#16)
Browse files Browse the repository at this point in the history
updated to match brekk/germs
  • Loading branch information
brekk authored Sep 10, 2017
1 parent 6cc1a4b commit 993900f
Show file tree
Hide file tree
Showing 18 changed files with 13,189 additions and 1,907 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ custom.js
*.js.map
.nyc_output
docs
.DS_Store
lib
36 changes: 17 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ const reallyCerboseConditionalLoggerWhenMultiplyingBy5 = R.pipe(

#### API

[![Greenkeeper badge](https://badges.greenkeeper.io/brekk/xtrace.svg)](https://greenkeeper.io/)

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

##### sideEffect
Expand All @@ -98,43 +96,43 @@ trace(`input`, 5) // only logs if DEBUG env var (e.g. DEBUG=my:custom:debugger n

Returns **any** whatever input is

##### xtrace
##### trace

xtrace is the same as sideEffect, only we dropped the inspect parameter by passing identity
trace is the same as xtrace, only we applied the first parameter as console.log, for convenience

**Parameters**

- `effect` **[function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)** function which does something independent of the returned value
- `tag` **any** first value to pass to the side effect
- `input` **any** the return value, and the value passed to the side effect
- `tag` **any** first value to pass to the console.log
- `input` **any** the return value, and the value passed to the console.log

**Examples**

```javascript
import {xtrace} from 'xtrace'
import _debug from 'debug'
const debug = _debug(`my:custom:debugger`)
const trace = xtrace(debug)
// [...]
trace(`input`, 5) // only logs if DEBUG env var (e.g. DEBUG=my:custom:debugger node this-file.js)
import {trace} from 'xtrace'
trace(`whatever`, 5) // logs 'whatever', 5
```

Returns **any** whatever input is

##### trace
##### xtrace

trace is the same as xtrace, only we applied the first parameter as console.log, for convenience
xtrace is the same as sideEffect, only we dropped the inspect parameter by passing identity

**Parameters**

- `tag` **any** first value to pass to the console.log
- `input` **any** the return value, and the value passed to the console.log
- `effect` **[function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)** function which does something independent of the returned value
- `tag` **any** first value to pass to the side effect
- `input` **any** the return value, and the value passed to the side effect

**Examples**

```javascript
import {trace} from 'xtrace'
trace(`whatever`, 5) // logs 'whatever', 5
import {xtrace} from 'xtrace'
import _debug from 'debug'
const debug = _debug(`my:custom:debugger`)
const trace = xtrace(debug)
// [...]
trace(`input`, 5) // only logs if DEBUG env var (e.g. DEBUG=my:custom:debugger node this-file.js)
```

Returns **any** whatever input is
Expand Down
2 changes: 2 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,6 @@ test:
override:
- yarn test
post:
# Copy over the coverage directory so we can view the HTML report in CI
# - mkdir -p $CIRCLE_ARTIFACTS/coverage
- mv coverage $CIRCLE_ARTIFACTS/.
16 changes: 0 additions & 16 deletions config/rollup.config.main.js

This file was deleted.

263 changes: 94 additions & 169 deletions dependencies.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions dependency-graph.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"core/index.js":["core/side-effect.js","core/trace.js","core/xtrace.js"],"core/side-effect.js":["Ⓜ katsu-curry/katsu-curry.js"],"core/trace.js":["core/xtrace.js"],"debug/index.js":["Ⓜ f-utility/f-utility.js","core/side-effect.js"],"index.js":["Ⓜ katsu-curry/katsu-curry.js","core/index.js","debug/index.js"]}
Loading

0 comments on commit 993900f

Please sign in to comment.