MCPcopy Create free account
hub / github.com/cujojs/poly / isExtensible

Function isExtensible

object.js:331–344  ·  view source on GitHub ↗
(object)

Source from the content-addressed store, hash-verified

329 }
330
331 function isExtensible (object) {
332 var prop = '_poly_';
333 try {
334 // create unique property name
335 while (prop in object) prop += '_';
336 // try to set it
337 object[prop] = 1;
338 return hasProp(object, prop);
339 }
340 catch (ex) { return false; }
341 finally {
342 try { delete object[prop]; } catch (ex) { /* squelch */ }
343 }
344 }
345
346 function preventExtensions (object) {
347 return object;

Callers

nothing calls this directly

Calls 1

hasPropFunction · 0.85

Tested by

no test coverage detected