Socket
Book a DemoInstallSign in
Socket

@greenlabs/rescript-date-fns

Package Overview
Dependencies
Maintainers
8
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@greenlabs/rescript-date-fns

ReScript bindings to date-fns

latest
npmnpm
Version
2.30.0
Version published
Maintainers
8
Created
Source

rescript-date-fns

Getting started

npm install @greenlabs/rescript-date-fns --save
or
yarn add @greenlabs/rescript-date-fns

Add "@greenlabs/rescript-date-fns" to bs-dependencies in your project's bsconfig.json

Differences from original date-fns API

In bindings the date parameter is moved to last position in a bunch of functions to work better with currying and make better use of pipe operator. Most of these can be seen from types. The ones that have same types but are different from date-fns:

laterDate |> DateFns.isAfter(earlierDate) /* true */
DateFns.isAfter(earlierDate, laterDate) /* true */

earlierDate |> DateFns.isBefore(laterDate) /* true */
DateFns.isBefore(laterDate, earlierDate) /* true */

middleDate |> DateFns.isWithinRange(earliestDate, latestDate) /* true */
DateFns.isWithinRange(earliestDate, latestDate, middleDate) /* true */

Keywords

ReScript

FAQs

Package last updated on 02 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