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

Sign up
Appearance settings
This repository was archived by the owner on Apr 10, 2024. It is now read-only.

Removal of array constructor ".last()" so that this project does not clash with other custom array methods#33

Open
egilll wants to merge 1 commit into
Jxck:master from
egilll:patch-2
Open

Removal of array constructor ".last()" so that this project does not clash with other custom array methods #33
egilll wants to merge 1 commit into
Jxck:master from
egilll:patch-2

Conversation

@egilll

@egilll egilll commented Sep 1, 2018

Copy link
Copy Markdown

Removal of array constructor ".last()" so that this project does not clash with other custom array methods.

Some other packages, like array-sugar, add new methods for arrays.

When such packages are used with html2json, HTML parsing will fail because of the clash of the newly created array methods ".last" and ".last()".

The proposed change removes the custom array method and uses vanilla Javascript instead.

The error that will otherwise pop up is: stack.last is not a function.

...clash with other custom array methods
Some other packages, like [`array-sugar`](https://github.com/capaj/array-sugar), add new methods for arrays.
When such packages are used with html2json, HTML parsing will fail because of the clash of the newly created array methods ".last" and ".last()".
The proposed change removes the custom array method and uses vanilla Javascript instead.
The error that will otherwise pop up is: `stack.last is not a function`.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /