Skip to content

name: "MyStampName" in stampit arguments

Compare
Choose a tag to compare
@koresar koresar released this 15 Sep 10:11
· 38 commits to master since this release

Now you can pass "name" property to stampit. It will automatically give your stamp (aka factory) the name. E.g.

const StripeService = stampit({
  name: "StripeService",
  init(_, {stamp}) {
    console.log("Creating an object from the stamp named", stamp.name);
  }
});

const SomeStamp = StripeService;

console.log(SomeStamp.name); // "StripeService"

See this blog post.