Skip to content

Home

Svelte Utility

Write less, Do more


The key features are:

  • Type Strong ๐Ÿ’ช: Written in TypeScript, with TS Docs.
  • Fast to code ๐Ÿš€: Increase the speed to develop features by about 200% to 300%.
  • Fewer bugs ๐Ÿž: Reduce about 40% of human (developer) induced errors.
  • SSR Friendly ๐Ÿ•บ: Works perfectly with server-side.
  • Easy ๐Ÿ’ซ: Designed to be easy to use and learn. Less time reading docs.
  • Interactive demos ๐ŸŽ‰ : Documentation of functions also come with interactive demos!.
  • Feature Rich ๐ŸŒˆ: 100+ functions for you to choose from.
  • Fully ๐ŸŒณ shakeable: Only take what you want.

Installation

$ pnpm add -D @sveu/actions

---> 100%
$ pnpm add -D @sveu/browser

---> 100%
$ pnpm add -D @sveu/extend

---> 100%
$ pnpm add -D @sveu/shared

---> 100%

๐Ÿงช Example

<script>
import { dropzone } from "@sveu/actions"

function hover(event) {
    ...
}

function on_file_drop(event) {
    ...
}
</script>

<div use:dropzone on:hover="{hover}" on:files="{on_file_drop}" />
<script>
import {permission} from "@sveu/browser"

const { state, supported } = permission("geolocation", {controls: true})
</script>

<h1>Is supported is: {$supported}</h1>

<h1>state is: {$state}</h1>
<script>
import { fcm } from "@sveu/extend/fcm"

const { token, error, supported, on_message } = fcm(firebase_app, {vapid_key:"my-key",})

</script>
<script>
import {strftime} from "@sveu/shared"

const time = strftime(Date.now(), "%Y-%m-%d %H:%M:%S") // 2023-03-09 13:52:34
</script>

{time}

๐Ÿ™ Thanks

This project is heavily inspired by the following awesome projects.

๐Ÿ“œ License

MIT License ยฉ 2022-PRESENT Mohamed Nesredin


Last update: 2023-03-09