Expose the prop method in the mincer instance
augnustin opened this issue · 3 comments
augnustin commented
In this project, mincer needs to be loaded simply to get access to:
var prop = require('mincer/lib/mincer/common').prop;
(line 3)
Would be convenient to being able to access it from the mincer
instance immediately.
puzrin commented
That's just a simple helpers for internal needs. I don't think it's good idea to expose those to public.
ixti commented
Just like @puzrin said, it's an internal helper that provide syntax sugar to define property, so it's as simple as:
Object.defineProperty(obj, "someProp", { value: 123 });
augnustin commented
Yep, that's what I did on my branch then.
But what if for some reason this method becomes extended, with additional behavior ? It might break everywhere Object.defineProperty(obj, "someProp", { value: 123 });
is used instead.