From 30418db838b4a1e09a7724eb55739707da90cc2b Mon Sep 17 00:00:00 2001 From: Almenon Date: Sun, 31 Dec 2017 17:45:09 -0800 Subject: [PATCH] updated readme with new method --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 0bf8a54..7bd0d3a 100644 --- a/README.md +++ b/README.md @@ -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