Remove singleton enforcement

Declined
#1 · Created  · Last updated

Declined pull request

Closed by: ·2017-08-24

Description

You can’t use callee in javascript strict mode. Doing so results in:

Uncaught TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them.

and stops execution of the entire library.

If a developer uses a singleton class in a non-singleton way it’s not the end of the world.

If this really requires singletons, maybe one of these patterns as discussed would be a better solution.

http://robdodson.me/javascript-design-patterns-singleton/

0 attachments

0 comments

Loading commits...