Sign in
Log inSign up

What is this snippet doing??

Aakash Mallik's photo
Aakash Mallik
·Dec 11, 2017

JavaScript code... Don't really know what is happening here...

extend(obj, id) {
 obj.toObject = (function(toObject) {
 return function() {
 return fabric.util.object.extend(toObject.call(this), {
 id: id
        });
      };
    })(obj.toObject);
  }
Hassle-free blogging platform that developers and teams love.
  • Docs by Hashnode
    New
  • Blogs
  • AI Markdown Editor
  • GraphQL APIs
  • Open source Starter-kit

© Hashnode 2024 — LinearBytes Inc.

Privacy PolicyTermsCode of Conduct