From c6a1b660ece31f208f083fcf72a5b10b5a0929f0 Mon Sep 17 00:00:00 2001 From: Alexey Shamrin Date: Fri, 15 Apr 2016 01:11:32 +0300 Subject: [PATCH] README --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 8207de7..c73d0f3 100644 --- a/README.md +++ b/README.md @@ -155,6 +155,18 @@ Immutable(new Square(2), {prototype: Square.prototype}).area(); Beyond [the usual Object fare](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object#Methods_of_Object_instances), the following methods have been added. +### Stack overflow protection + +Currently you can't construct Immutable from an object with circular references. To protect from ugly stack overflows, we provide a simple protection during development. We stop at suspiciously deep stack level and [show an error message][deep]. + +If your objects are deep, but not circular, you can increase this level from default `64`. For example: + +```javascript +Immutable(deepObject, null, 256); +``` + +[deep]: https://github.com/rtfeldman/seamless-immutable/wiki/Deeply-nested-object-was-detected + ### merge ```javascript