ecmascript 6 - Obj-C category/extension Swift in Javascript ES6 -


i'm looking add methods class in javascript es6 without creating subclass of it, in same way categories in objective-c or extensions in swift.

i didn't find information it.

any suggestion?

es6 class syntax syntax sugar on javascript's prototypal inheritance model. add methods class, can add more properties onto prototype.

class {  }  something.prototype.newmethod = function(){  }; 

Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -