(val)
| 427 | // If val is something we should be freezing but aren't yet, |
| 428 | // add it to freezingSet. |
| 429 | function enqueue(val) { |
| 430 | if (Object(val) !== val) { |
| 431 | // ignore primitives |
| 432 | return; |
| 433 | } |
| 434 | const type = typeof val; |
| 435 | if (type !== 'object' && type !== 'function') { |
| 436 | // NB: handle for any new cases in future |
| 437 | } |
| 438 | if (frozenSet.has(val) || freezingSet.has(val)) { |
| 439 | // TODO: Use uncurried form |
| 440 | // Ignore if already frozen or freezing |
| 441 | return; |
| 442 | } |
| 443 | freezingSet.add(val); // TODO: Use uncurried form |
| 444 | } |
| 445 | |
| 446 | function doFreeze(obj) { |
| 447 | // Immediately freeze the object to ensure reactive |
no test coverage detected
searching dependent graphs…