Skip to content

Commit

Permalink
- splitted files to take advantage of tree-shaking
Browse files Browse the repository at this point in the history
- the placeholder object is now exported as `__`
- switched to Jest as a test suite
  • Loading branch information
ascartabelli committed Feb 12, 2019
1 parent 28000c8 commit 3034404
Show file tree
Hide file tree
Showing 418 changed files with 27,056 additions and 23,865 deletions.
8 changes: 6 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"env": {
"amd": true,
"browser": true,
"node": true
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": 5
"ecmaVersion": 5,
"sourceType": "module"
},
"root": true,
"rules": {
Expand Down Expand Up @@ -210,6 +210,10 @@
}
}
],
"object-curly-spacing": [
"error",
"always"
],
"one-var": [
"error",
"never"
Expand Down
2 changes: 1 addition & 1 deletion .eslintrc.test.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"env": {
"jasmine" : true,
"jest" : true,
"node": true
},
"extends": [
Expand Down
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
language: node_js
before_script:
- npm install -g gulp
- npm install -g gulp-cli
script:
- gulp travis
node_js:
- "stable"
- "10"
- "9"
- "8"
- "7"
Expand Down
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,17 @@ Require it in node.js:
var _ = require("lamb");
```

It's useful to alias it to have a shorter symbol, like `_`, as I did above and throughout the documentation: it's cleaner and the
`lamb` object itself can be used as a placeholder argument in [partial application](https://ascartabelli.github.io/lamb/module-lamb.html#partial).
Since version 0.57.0, Lamb is splitted in ES modules and can take advantage of tree-shaking capabilities of module bundlers:

```javascript
import * as _ from "lamb";
```

You can also import only the functions you want to use:

```javascript
import { compose, map } from "lamb";
```

In a browser, simply include the version you want from the `dist` folder:

Expand Down
Loading

0 comments on commit 3034404

Please sign in to comment.