0.0.38 • Published 3 days ago

fish-helper v0.0.38

Weekly downloads
-
License
MIT
Repository
-
Last release
3 days ago
npm install fish-helper
const helper = require('fish-helper')

Methods

  • add(hour, start) ------- add Hour from start date, return timestamp

  • offset_time(date, type) ------- The time difference (absolute value), returns the corresponding string as the second argument, such as 01,22....

  • 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 include 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 include 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 funtion to stop the fn

  • is_equal(a, b) ------- return boolean, compare a and b; a and b are any type of data
0.0.38

3 days ago

0.0.37

23 days ago

0.0.34

23 days ago

0.0.35

23 days ago

0.0.36

23 days ago

0.0.30

24 days ago

0.0.31

24 days ago

0.0.32

24 days ago

0.0.33

24 days ago

0.0.26

24 days ago

0.0.27

24 days ago

0.0.28

24 days ago

0.0.29

24 days ago

0.0.25

2 months ago

0.0.24

2 months ago

0.0.21

3 months ago

0.0.22

3 months ago

0.0.23

3 months ago

0.0.20

1 year ago

0.0.13

1 year ago

0.0.14

1 year ago

0.0.15

1 year ago

0.0.16

1 year ago

0.0.17

1 year ago

0.0.18

1 year ago

0.0.19

1 year ago

0.0.12

1 year ago

0.0.11

1 year ago

0.0.10

1 year ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago