MCPcopy Create free account
hub / github.com/TruthHun/BookStack / getDataPropertyOrDefault

Function getDataPropertyOrDefault

static/word2md/mammoth.browser.js:9268–9280  ·  view source on GitHub ↗
(obj, key, defaultValue)

Source from the content-addressed store, hash-verified

9266}
9267
9268function getDataPropertyOrDefault(obj, key, defaultValue) {
9269 if (es5.isES5) {
9270 var desc = Object.getOwnPropertyDescriptor(obj, key);
9271
9272 if (desc != null) {
9273 return desc.get == null && desc.set == null
9274 ? desc.value
9275 : defaultValue;
9276 }
9277 } else {
9278 return {}.hasOwnProperty.call(obj, key) ? obj[key] : undefined;
9279 }
9280}
9281
9282function notEnumerableProp(obj, name, value) {
9283 if (isPrimitive(obj)) return obj;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected