Gathering detailed insights and metrics for date-fns-lost
Gathering detailed insights and metrics for date-fns-lost
Gathering detailed insights and metrics for date-fns-lost
Gathering detailed insights and metrics for date-fns-lost
Lost tools for moment including domain specific language for time manipulations and schedule operations.
npm install date-fns-lost
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
1 Stars
24 Commits
1 Watchers
3 Branches
1 Contributors
Updated on May 17, 2022
Latest Version
2.3.0
Package Id
date-fns-lost@2.3.0
Unpacked Size
21.30 kB
Size
5.42 kB
File Count
10
NPM Version
9.8.0
Node Version
20.5.0
Published on
Aug 05, 2023
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
4
Lost tools for moment including domain specific language for time manipulations and schedule operations.
1import momentRange from 'moment-range' 2import momentTz from 'moment-timezone' 3const moment = momentRange.extendMoment(momentTz) 4import lost from 'date-fns-lost' 5const { 6 chrono, 7 spanner, 8 schedule, 9 dsl, 10 iso8601 11} = lost(moment) 12 13const content = ` 14 // 15 // A date constant is either an iso8601 string or a reference 16 // to another constant. Constants can optionally be followed 17 // immediately by spanner operations. 18 // 19 // day_in_june: 2018-06-15T10:00:00Z 20 // start_of_june: day_in_june/M 21 // 22 // 23 // An interval is a repeating pattern and can be specified as: 24 // 25 // interval(anchor, duration, repeat) 26 // 27 // Where: 28 // anchor - A reference to a constant optionally followed 29 // by spanner operations. 30 // duration - A spanner operation to calculate the duration 31 // of each iteration. 32 // repeat - A number followed by the name or short code 33 // of a unit to jump forward and backwards from 34 // anchor to create the pattern. 35 // 36 // 37 // A range is all time between a start and an end 38 // 39 // range(start, end) 40 // 41 // Where: 42 // start - A reference to a constant optionally followed 43 // by spanner operations. Inclusive in the range. 44 // end - A reference to a constant optionally followed 45 // by spanner operations. Inclusive in the range. 46 // 47 // 48 // Both interval and range cannot accept iso8601 parameters, 49 // these can be defined as constants and referenced. 50 // 51 // 52 // Spanner operations are executed sequentially against a 53 // constant or if not supplied will default to the current time. 54 // 55 // (timezone) - Changes all following operations to be 56 // executed in the supplied timezone. 57 // http://momentjs.com/timezone/ 58 // +5days - Add or substract a multiple of a time unit. 59 // +5d4h - Can use short codes and multiple units. 60 // /M - Jump to the start of time unit. 61 // 62 63 start: now/M 64 end: now+4M/M 65 66 result: 67 + interval(now/M, +7d, 1M) 68 * interval(/isoWeek+1d, +1d, 1w) 69 70` 71const parsed = dsl.parse(content) 72console.log(parsed.schedules) 73const clip = moment.range(parsed.constants.start, parsed.constants.end) 74const segments = schedule.between(parsed.schedules, parsed.schedules.result, clip) 75for (let segment of segments) 76 console.log(segment.start.format(iso8601), '—', segment.end.format(iso8601))
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
9 existing vulnerabilities detected
Details
Reason
Found 0/24 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More