Skip to content

Commit

Permalink
Update last.js
Browse files Browse the repository at this point in the history
  • Loading branch information
shysolocup authored Jan 29, 2024
1 parent 3d02c28 commit 2d56f01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Soup/functions/last.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const Soup = require('../index.js');

function SoupLast(offset=0) {
let entry = this.entries[(this.length-1)-offset];
return (this.type == "pair") ? {key: entry[0], value: entry[1], index: this.length-1} : entry[1];
return entry[1]
}


Expand Down

0 comments on commit 2d56f01

Please sign in to comment.