Skip to content

Latest commit

 

History

History
23 lines (19 loc) · 468 Bytes

README.md

File metadata and controls

23 lines (19 loc) · 468 Bytes

Dog Timer Decorator

A example of Time Decorator with Node.js + Typescript + Dog Ceo API

Reusable decorator

@Timer()
  async fetch() {
    const { data } = await axios.get(this.url);
    return data;
  }

Response

{
  message: 'https://images.dog.ceo/breeds/terrier-border/n02093754_6257.jpg',
  status: 'success',
  duration: '532.32ms'
}