MCPcopy
hub / github.com/strongloop/loopback / observeOptionsOnAccess

Function observeOptionsOnAccess

test/context-options.test.js:400–406  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

398 }
399
400 function observeOptionsOnAccess() {
401 const Model = arguments[0] || Product;
402 Model.observe('access', function(ctx, next) {
403 actualOptions = ctx.options;
404 next();
405 });
406 }
407
408 function givenProductId1() {
409 return Product.create({id: 1, name: 'Pen'});

Callers 1

Calls 1

nextFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…