0.0.42 • Published 6 months ago

fish-helper v0.0.42

Weekly downloads
-
License
MIT
Repository
-
Last release
6 months ago
npm install fish-helper
const helper = require('fish-helper')
MethodDescription
add(hour, start)Add hour from start date, return timestamp.
offset_time(date, type)The time difference (absolute value), returns the corresponding string.
before_lt_hour(date, hour)The date is less than now, and the date is less than hour from now.
before_gt_hour(date, hour)The date is less than now, and the date is greater than hour from now.
after_lt_hour(date, hour)The date is greater than now, and the date is less than hour from now.
after_gt_hour(date, hour)The date is greater than now, and the date is greater than hour from now.
is_current_year(date)Return boolean.
get_time_obj(date)Return object that includes keys: year, month, day, hour, minute, seconds, day_of_week.
format_count({num, divide, suffix, show_suffix_always})Return num or string or 0.
format_num2date(timestamp)Convert time to object; return object that includes keys: day, hour, minute, seconds.
count_down(date, fn)End time countdown, end time can be passed in by itself; fn is a callback function that takes a remaining time argument; return a function to stop the timer.
count_down_by_remain_seconds(fn, seconds)60-second countdown. Time can pass by itself.
format_thousandth(num)Format the data as a string with thousands of bits.
is_empty(data)Determines whether the data is empty.
poll(fn, minute)Execute fn function every minute, return function to stop the fn.
is_equal(a, b)Return boolean, compare a and b; a and b are any type of data.
sleep(ms)Suspend
0.0.42

6 months ago

0.0.41

12 months ago

0.0.40

1 year ago

0.0.39

1 year ago

0.0.38

1 year ago

0.0.37

1 year ago

0.0.34

1 year ago

0.0.35

1 year ago

0.0.36

1 year ago

0.0.30

1 year ago

0.0.31

1 year ago

0.0.32

1 year ago

0.0.33

1 year ago

0.0.26

1 year ago

0.0.27

1 year ago

0.0.28

1 year ago

0.0.29

1 year ago

0.0.25

1 year ago

0.0.24

1 year ago

0.0.21

1 year ago

0.0.22

1 year ago

0.0.23

1 year ago

0.0.20

2 years ago

0.0.13

2 years ago

0.0.14

2 years ago

0.0.15

2 years ago

0.0.16

2 years ago

0.0.17

2 years ago

0.0.18

2 years ago

0.0.19

2 years ago

0.0.12

2 years ago

0.0.11

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago