Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prototype based #31

Merged
merged 23 commits into from Dec 14, 2014
Merged

Prototype based #31

merged 23 commits into from Dec 14, 2014

Conversation

brettz9
Copy link
Collaborator

@brettz9 brettz9 commented Dec 9, 2014

Building on whitespace and JSLint changes, this PR moves to prototype-based inheritance in order to save on memory. It is backward compatible, though I have deprecated the old singleton style in favor of a class-based approach (I might still allow for a separate evaluate method but which would be auto-called by default for convenience and backward compatibility).

If the pseudo-privacy of the new underscored methods is a problem, we can simulate private instance methods by .call(this, ...), but that has a run-time cost, and I don't think pseudo-privacy is any real problem.

… use consistently use single quotes except where content includes double quotes
…ed arg (as per other patch); export class and deprecate exporting of singleton and class method (will probably allow for instance to avoid autostarting)
…ward compatibility. Having options first will allow separate calls for the object and expression to an evaluate method if autostarting is not desired
…and deprecated syntaxes in docs; document properties and elaborate on syntax
…hes with sandbox-supplied vars; indicate object is private var.
@brettz9
Copy link
Collaborator Author

brettz9 commented Dec 10, 2014

Sorry for the errors in the past few commits, but now fixed. Addresses issue #25 (though issue #4 would be a heckuva lot better if that could be fixed).

@s3u s3u merged commit 9eb396b into JSONPath-Plus:master Dec 14, 2014
@brettz9 brettz9 deleted the prototype-based branch December 13, 2015 04:20
@brettz9
Copy link
Collaborator Author

brettz9 commented Dec 13, 2015

@moul See issue #40

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants