Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ulu/utils

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ulu/utils - npm Package Compare versions

Comparing version 0.0.11 to 0.0.12

4

CHANGELOG.md
# Change Log
## 0.0.12
- Array > getFirstLast() Test whether an index in an array is first or last
## 0.0.11

@@ -4,0 +8,0 @@

@@ -107,2 +107,16 @@ /**

}
}
/**
* Test whether an index in an array is first or last
* - Returns an object with both first/last keys (true/false)
* @param {Array} array Array to check index against (uses .length)
* @param {Number} index Index to get info for
* @returns {Object} { first: {Boolean}, last: {Boolean} }
*/
export function getFirstLast(array, index) {
return {
first: index === 0,
last: index === array.length - 1
};
}

2

package.json
{
"name": "@ulu/utils",
"version": "0.0.11",
"version": "0.0.12",
"description": "Low level utility library",

@@ -5,0 +5,0 @@ "keywords": [

@@ -59,2 +59,10 @@ /**

export function joinForSentence(array: any): string;
/**
* Test whether an index in an array is first or last
* - Returns an object with both first/last keys (true/false)
* @param {Array} array Array to check index against (uses .length)
* @param {Number} index Index to get info for
* @returns {Object} { first: {Boolean}, last: {Boolean} }
*/
export function getFirstLast(array: any[], index: number): any;
//# sourceMappingURL=array.d.ts.map

Sorry, the diff of this file is not supported yet

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