🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

nuxt3-date-fns

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nuxt3-date-fns

date-fns for Nuxt

0.2.0
latest
Source
npm
Version published
Weekly downloads
36
50%
Maintainers
1
Weekly downloads
 
Created
Source

date-fns for Nuxt

Version License Types

💡 About

date-fns auto-import module for Nuxt.

📦 Install

  • Install nuxt-date-fns as development dependency:
npm i nuxt3-date-fns -D
yarn add nuxt3-date-fns -D
pnpm i nuxt3-date-fns -D
  • Add it to the modules section of your nuxt.config:
export default defineNuxtConfig({
  modules: ["nuxt3-date-fns"],
});

🚀 Example

Use any Date-Fns methods in your Nuxt application, they will be auto-imported!

<script setup>
  const date = useFormat(new Date(2024, 1, 11), "MM/dd/yyyy");
</script>

<template>
  <div>{{ date }}</div>
</template>

🔨 Config

NameDefaultDescription
prefix'use'String to prepend before each date-fns function (false to disable)

💻 Example - Config

export default defineNuxtConfig({
  modules: ["nuxt3-date-fns"],
  "date-fns": {
    prefix: "_",
  },
});

📄 License

MIT License © 2024 - Siddharth Sarathe

Keywords

nuxt

FAQs

Package last updated on 18 Jan 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts