Skip to content

Commit

Permalink
updated readme with new method
Browse files Browse the repository at this point in the history
  • Loading branch information
Almenon committed Jan 1, 2018
1 parent 5c4f73e commit 30418db
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,14 @@ can do.

[1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify

```javascript
renderjson.set_collapse_msg(collapse_function);
```

Accepts a function (len:number):string => {} where len is the length of the object collapsed.
Function should return the message displayed when a object is collapsed.
The default msg is [X items]

These functions are chainable so you may do:

```javascript
Expand Down

0 comments on commit 30418db

Please sign in to comment.