Comparing version
{ | ||
"name": "fn-code", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "Functions (fn) to make code cleaner", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -23,6 +23,3 @@ # Fn functions | ||
```typescript | ||
// Typescript | ||
import fn from 'fn-code' | ||
// Commonjs | ||
const fn = require('fn-code') | ||
``` | ||
@@ -71,3 +68,3 @@ | ||
Ughhh! This escalates badly. Also ternary operator is only clean if the third operand is default value (not another conditional). | ||
Ughhh! This escalates badly. Also, the ternary operator is only clean when the third operand is the default value (and not another conditional). | ||
@@ -92,4 +89,2 @@ So, you are clever and you make a function: | ||
Alternatively, if it feels more familiar you can use `fn.switch` as it is an alias for `fn.one`,. | ||
## Usage | ||
@@ -111,3 +106,4 @@ | ||
What if you want to have a default value for binomialName when no condition is met? For that, you can use the third optional argument, passing `{ default: '' }` | ||
But what if you want to have a **default** value for binomialName when no condition is met? | ||
For that, you can use the third optional argument, passing `{ default: '' }` | ||
@@ -124,2 +120,4 @@ ````typescript | ||
Alternatively, if it feels more familiar you can use `fn.switch` instead, as it is an alias for `fn.one`.**** | ||
## Testing | ||
@@ -126,0 +124,0 @@ |
Sorry, the diff of this file is not supported yet
9386
-0.23%143
-1.38%