New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

just-last

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

just-last - npm Package Compare versions

Comparing version 1.1.20 to 1.1.21

2

index.js

@@ -10,3 +10,3 @@ module.exports = last;

function last(arr) {
return arr[arr.length - 1];
return arr != null ? arr[arr.length - 1] : undefined;
}
{
"name": "just-last",
"version": "1.1.20",
"version": "1.1.21",
"description": "return the last member of an array",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -12,2 +12,6 @@ ## just-last

last([true, false, [true, false]]); // [true, false]
last(); // undefined
last([]); // undefined
last(null); // undefined
last(undefined); // undefined
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc