Socket
Socket
Sign inDemoInstall

ts-multitool

Package Overview
Dependencies
0
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.2 to 0.0.3

lib/cjs/array/index.d.ts

2

package.json
{
"name": "ts-multitool",
"version": "0.0.2",
"version": "0.0.3",
"description": "TypeScript MultiTool - A library full of tree-shakable TypeScript functions for application construction in both CommonJS and ESM",

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

# TypeScript MultiTool 🛠
In the journey of building applications in TypeScript you will need a menagerie of functions. Typically the user's trip down Google lane will bring you to StackOverflow. The code is copied into the editor and the app construction continues. Bad, no chance the testing is added and now problems arise. The TypeScript MultiTool is a tree-shakable pile of functions helpful for building apps with all of the tests included in the library.
On the journey of building applications in [TypeScript](https://www.typescriptlang.org/) you will need a menagerie of functions. Typically the user's trip down Google lane will bring you to [StackOverflow](https://stackoverflow.com). The code is copied into the editor and the app construction continues. Bad, no chance the testing is added and now problems arise. The TypeScript MultiTool is a tree-shakable pile of functions helpful for building apps with all of the tests included in the library.
## Motivation
Building software in accurately and quickly tends to yield a solution missing a lot of test coverage for quick and dirty functions typically plucked from the reality of finding them in google searches or on StackOverflow. This library is my own pile of functions I am using with the included test coverages to manage them.
Building software accurately and quickly tends to yield a solution missing a lot of test coverage for quick and dirty functions usually plucked from google searches or [StackOverflow](https://stackoverflow.com). This library is my own pile of functions I am using with the included test coverages to manage them.
## Installation
The recommended way to install the anticipated.io SDK is through `npm` or `Yarn`. The library is exposed as CommonJS and ESM.
The recommended way to install is through `npm` or `Yarn`. The library is exposed as CommonJS and ESM.

@@ -40,3 +40,3 @@ npm:

```typescript
import { commaSeparatedString } from 'ts-multitool/lib/esm/text/commaSeparatedString'
import { commaSeparatedString } from 'ts-multitool'
const response = commaSeparatedString(['first', 'second', 'third'])

@@ -48,6 +48,6 @@ assert(response === 'first, second and third')

TCapitalizes the first letter of a string. It does NOT force lowercase on the remaining letters.
Capitalizes the first letter of a string. It does NOT force lowercase on the remaining letters.
```typescript
import { capitalize } from 'ts-multitool/lib/esm/text/capitalize'
import { capitalize } from 'ts-multitool'
const response = capitalize('thomas')

@@ -59,2 +59,34 @@ assert(response === 'Thomas')

## Array Functions (available at `/array/`)
---
### `unique<T>(T[])`
Returns a list of unique values from the given array (supports primitives)
```typescript
import { unique } from 'ts-multitool'
const list = unique([1, 2, 3, 4, 3, 2, 4, 1])
// returns [1, 2, 3, 4]
```
---
## File Functions (available at `/files/`)
---
### `getExtension(string)`
Get the extension of a file.
```typescript
import { getExtension } from 'ts-multitool'
const ext = getExtension('somefile.that.you.need.jpg')
assert(response === 'jpg')
```
---
## Have something to add (or something is busted)?

@@ -61,0 +93,0 @@

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc