gobwas/dm.js

Add slug options

Closed this issue · 2 comments

Ability to lazy evaluate services with slugs.

For example:

slugly_service: {
  path: "...",
  lazy: true,
  arguments: ["$0", "@some_service"],
  calls: [["setB", ["$1"]]],
  properties: {slug: "$0"}
}

will return some like:

function(a, b) {
   (new SluglyService(a, someService)).setB(b).slug = a;
}

cache respectively to passed params?

and this slugs will be only actual for the lazy: true marked services?