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 9561cc6 commit 9fbec79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Stew/functions/last.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const Stew = require('../index.js');

function StewLast(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 9fbec79

Please sign in to comment.