0.9.1 • Published 3 months ago

@slipmatio/toolbelt v0.9.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

Slipmat Toolbelt

Note: this project is under active development, you should pin the strict version to avoid breakages.

General utilities for Web development

Features

Browser

  • browserIsIE()
  • browserIsSupported()
  • copyToClipboard(content: string)
  • deleteCookie(name: string, path = '/', domain: string | undefined = undefined, secure = false, sameSite: 'Lax' | 'Strict' | 'None' | undefined = undefined)
  • getCookie(name: string)
  • hasTimeZoneSupport()
  • isBot(ssrReturn: boolean)
  • isValidSecureUrl(url: string)
  • prefetchImages(url: string|string[])
  • storageAvailable(type: 'localStorage' | 'sessionStorage')

Vue

  • getNext(allowedDomains: string[], router?: Router) - returns the value of ?next query param or /
  • getNextPath(router?: Router) - returns the value of ?next query param or /
  • isString(value: string | LocationQueryValue[])

Installation

pnpm add @slipmatio/toolbelt

Usage

Browser tools: import { tool } from @slipmatio/toolbelt

Vue tools (vue and vue-router required): import { tool } from @slipmatio/toolbelt/vue

Development

Install dependencies

pnpm i

Run development server

pnpm dev

Testing

Type check: pnpm ts

Unittests

  1. pnpm test

E2E

  1. Run the backend: uv run uvicorn api:app --reload
  2. pnpm test:e2e

Publishing

Bump version number in package.json, merge to main.

Contributing

Contributions are welcome! Please follow the code of conduct when interacting with others.

Elsewhere

Follow @uninen on Twitter

0.3.0

8 months ago

0.9.0

3 months ago

0.8.1

6 months ago

0.7.2

6 months ago

0.8.0

6 months ago

0.7.1

6 months ago

0.9.1

3 months ago

0.8.2

6 months ago

0.5.0

8 months ago

0.4.1

8 months ago

0.3.2

8 months ago

0.4.0

8 months ago

0.3.1

8 months ago

0.7.0

6 months ago

0.6.0

6 months ago

0.5.1

7 months ago

0.2.2

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago

0.0.5

2 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago

0.0.1-alpha.6

3 years ago

0.0.1-alpha.5

3 years ago

0.0.1-alpha.4

3 years ago

0.0.1-alpha.3

3 years ago

0.0.1-alpha.2

3 years ago

0.0.1-alpha.1

3 years ago

0.0.1-alpha.0

3 years ago