Releases: creativecuriositystudio/node-rules
Releases · creativecuriositystudio/node-rules
7.4.0-cc
7.3.2-cc
make current-date match the date in the current timezone
7.3.1-cc
fix bug in untested code... :\
7.3.0-cc
add 'current-date' as an option to the 'timeBetween' accessors
7.2.0-cc
store permutations count in global facts by default (_global.permCount)
7.1.3-cc
fix a bug with forEach that lead to completely empty forEach objs generating a single perm result when there should be nothing
7.1.2-cc
remove console logs
7.1.1-cc
fix missing rules bug
7.1.0-cc
- Add date diff calculators (time between two dates)
Usage:{ output: { $daysBetween: [date1, date2] }}
Diffs are integers by default, but can be made floats by passingtrueas the 3rd element
Possible diffs are:$millisecondsBetween$secondsBetween$minutesBetween$hoursBetween$daysBetween$weeksBetween$monthsBetween$quartersBetween$yearsBetween
- Add 'global' facts for shared data across
forEachruns
Data is available at_global
Starting data can be passed as last element in theforEachlist, otherwise it defaults to an empty object
Eg.execute({ items: [1, 2] }, forEach: ['items', { global: 'state' }])->[{ items: 1, _global: { global: 'state' }}, { items: 2, _global: { global: 'state' }}]
7.0.0-cc
swap $in and $contains as they were backwards