date-fns but for vue composition-api
npm install date-fns-reactified






This is meant as a replacement of date-fns for vue.js composition api with Ref<>. It uses reactify from @vueuse/core all over the place.
``bash`
npm i date-fns-reactified
instead of:
`typescript
import { addDays } from 'date-fns';
import { ref } from 'vue-demi';
const date = ref(new Date());
const days = ref(7);
const newDate = addDays(date.value, days.value)
`
do this:
`typescript
import { addDays } from 'date-fns-reactified';
import { ref } from 'vue-demi';
const date = ref(new Date());
const days = ref(7);
const newDate = addDays(date, days)
`
Simply run npm test and all your tests in the test/` directory will be run. It has full support for Visual Studio Code. You can use the debugger to set breakpoints.
Licensed under the MIT license.