Security News
Introducing the Socket Python SDK
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
SSR-safe time element for Nuxt 3
<time>
elementInstall and add nuxt-time
to your nuxt.config
.
# Whichever matches your package manager
pnpm add -D nuxt-time
npm install -D nuxt-time
yarn add -D nuxt-time
export default defineNuxtConfig({
modules: ['nuxt-time'],
})
To use, you can use the <NuxtTime>
component anywhere in your app. It will render a spec-compliant <time>
element.
It accepts datetime
and locale
(optional) properties, along with any property accepted by Intl.DateTimeFormat
(see MDN reference). Note: you can provide a Date
or number
(e.g. Date.now()
) via datetime
and it will be rendered correctly as an ISO-formatted date.
<template>
<!--
Date.now() will safely respect the time on the server, not on the
client. What's more, there will be no flash between server
and client locale formatting.
-->
<NuxtTime :datetime="Date.now()" second="numeric" month="long" day="numeric" />
</template>
corepack enable
(use npm i -g corepack
for Node.js < 16.10)pnpm install
pnpm dev:prepare
pnpm dev
to start playground in development modeMade with ❤️
Published under the MIT License.
FAQs
Safely render local dates and times on the server with Nuxt 3
The npm package nuxt-time receives a total of 2,203 weekly downloads. As such, nuxt-time popularity was classified as popular.
We found that nuxt-time demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.
Security News
A new Rust RFC proposes "Trusted Publishing" for Crates.io, introducing short-lived access tokens via OIDC to improve security and reduce risks associated with long-lived API tokens.