Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Prototype based#31

Merged
s3u merged 23 commits into
JSONPath-Plus:masterJSONPath-Plus/JSONPath:masterfrom
brettz9:prototype-basedbrettz9/JSONPath:prototype-basedCopy head branch name to clipboard
Dec 14, 2014
Merged

Prototype based#31
s3u merged 23 commits into
JSONPath-Plus:masterJSONPath-Plus/JSONPath:masterfrom
brettz9:prototype-basedbrettz9/JSONPath:prototype-basedCopy head branch name to clipboard

Conversation

@brettz9

@brettz9 brettz9 commented Dec 9, 2014

Copy link
Copy Markdown
Collaborator

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

brettz9 commented Dec 10, 2014

Copy link
Copy Markdown
Collaborator Author

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

brettz9 commented Dec 13, 2015

Copy link
Copy Markdown
Collaborator Author

@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.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.