# nuxt-radash

> radash for Nuxt

Latest version **1.0.0** (published 2023-07-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install nuxt-radash
pnpm add nuxt-radash
yarn add nuxt-radash
bun add nuxt-radash
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2023-07-26 |
| First published | 2023-07-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 7.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 20 |
| Author | Batuhan Göksu |
| Maintainers | bbg0x |
| Keywords | nuxt, nuxt-module, radash |

## Links

- npm: https://www.npmjs.com/package/nuxt-radash
- Repository: https://github.com/bbg/nuxt-radash
- Homepage: https://github.com/bbg/nuxt-radash#readme
- Issues: https://github.com/bbg/nuxt-radash/issues
- npm.io page: https://npm.io/package/nuxt-radash

## Dependencies (2)

- [radash](https://npm.io/package/radash.md) ^11.0.0
- [@nuxt/kit](https://npm.io/package/@nuxt/kit.md) ^3.6.5

## Recent versions

- 1.0.0 (latest) — 2023-07-26

## README

## Radash for Nuxt

[Radash](https://radash-docs.vercel.app) auto-import module for [Nuxt](https://nuxtjs.org).

## 📦 Install

Install `nuxt-radash` as development dependency:

```bash
npm i nuxt-radash -D
```

Add it to the `modules` section of your `nuxt.config`:

```ts
export default defineNuxtConfig({
  modules: ["nuxt-radash"],
});
```

## 🚀 Example

Use any [Radash](https://radash-docs.vercel.app/) methods in your Nuxt application, they will be auto-imported!

```html
<script setup>
const fish = [
  {
    name: "Marlin",
    weight: 105,
    source: "ocean",
  },
  {
    name: "Bass",
    weight: 8,
    source: "lake",
  },
  {
    name: "Trout",
    weight: 1,
    source: "lake",
  },
];

const ra = {
  Mode: "god",
  Power: "sun",
};

const min = useMin(fish, (f) => f.weight);
const text = usePascal("it works!");
const lowerize = useLowerize(ra);
const snake = stringToSnake('green fish blue fish')
</script>

<template>
  <div>{{ text }}</div>
  <pre>{{ min }}</pre>
  <pre>{{ lowerize }}</pre>
  <pre>{{ snake }}</pre>
</template>
```

## 🔨 Config

| Name               | Default | Description                                                                           |
| ------------------ | ------- | ------------------------------------------------------------------------------------- |
| `prefix`           | `'use'` | String to prepend before each Radash function (false to disable)                      |
| `prefixSkip`       | `'is'`  | Functions that starts with this keywords will be skipped by prefix (false to disable) |
| `upperAfterPrefix` | `true`  | If true it will automatically uppercase first letter after prefix (false to disable)  |
| `alias`            | `[]`    | Array of array pairs to rename specific Radash functions (prefix is still added)      |

## 💻 Example - Config

```ts
export default defineNuxtConfig({
  modules: ["nuxt-radash"],
   radash: {
    prefix: '_',
    prefixSkip: ['string'],
    upperAfterPrefix: true,
    alias: [
      ['snake', 'stringToSnake'], // => stringToSnake
    ]
  }
});
```

## Acknowledgement
The development of nuxt-radash was made possible thanks to the inspiration and code base from [Nuxt-Radash](https://github.com/cipami/nuxt-Radash).

## 📄 License

[MIT License](https://github.com/bbg/nuxt-radash/blob/master/LICENSE) © 2021-2022 - [Batuhan Göksu](https://github.com/bbg)

---
_Source: https://npm.io/package/nuxt-radash · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
