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.10 to 0.0.11

5

CHANGELOG.md
# Change Log
## 0.0.11
- Array > joinForSentence (Used for joining array of strings/numbers for a sentence)
- Example [1,2,3] "1, 2 and 3"
## 0.0.10

@@ -4,0 +9,0 @@

@@ -90,2 +90,19 @@ /**

return matrix;
}
/**
* Joins an array into sentence form
* - IE ["2013", "2015", "2020"] --> "2013, 2015 and 2020"
* @param {Array.<String, Number>} arr Array to join
* @returns {String}
*/
export function joinForSentence(array) {
if (array.length === 0) {
return "";
} else if (array.length === 1) {
return array[0];
} else {
return array.slice(0, array.length - 1).join(", ") + " and " + array[array.length - 1];
}
}

2

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

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

@@ -52,2 +52,9 @@ /**

export function createEmptyMatrix(columnCount: number, rowCount: number, value?: any): Array.Array;
/**
* Joins an array into sentence form
* - IE ["2013", "2015", "2020"] --> "2013, 2015 and 2020"
* @param {Array.<String, Number>} arr Array to join
* @returns {String}
*/
export function joinForSentence(array: any): string;
//# 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