New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

fnlibrary

Package Overview
Dependencies
Maintainers
0
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fnlibrary

js

latest
npmnpm
Version
1.1.1
Version published
Maintainers
0
Created
Source

#欢迎使用js函数库

安装

npm i fnlibrary

使用

  • import { GlobalMethods } from 'fnlibrary'
  • GlobalMethods.函数库

函数库

  • ArrayDeduPlicaTion([1,1,2,3]) 数组去重
  • StringDeduPlicaTion('asasa') 字符串去重
  • type(1) 输入一个值,返回其数据类型
  • getCurrentDateTime() 获取当前日期yy-mm-dd hh:mm:ss
  • getFormattedDate() 获取当前日期yy-mm-dd
  • getDaysBetween('2024-06-11','2024-06-21') 计算两个日期之间的天数
  • addDays(new Date(), 5) 添加天数
  • getOffsetDay(new Date(), -1) 计算日期偏移天数
  • debounce(fn,1000) 防抖
  • throttle(fn,1000) 节流
  • uniqueByProperty(arr, prop) 根据属性值去重
  • uniqueByProperties(arr, props) 根据多个属性值去重
  • isEmptys (obj) 判断对象是否为空
  • handleSystemDates(param, dateVal) param: 1-获取当前日期,2-获取当前时间,3-获取当前日期和时间,4-获取当前日期和时间(毫秒), dateVal: 日期格式
  • buildTree(data, pidKey = 'pid') 构建树形结构
  • findMaxValue(numbers) 获取数组中的最大值
  • findMinValue(numbers) 获取数组中的最小值
  • convertToUpperCase(text) 大写
  • convertToLowerCase(text) 小写
  • scrollToBottom() 滚动到底部

动画库

欢迎大家投个稿

Keywords

js

FAQs

Package last updated on 01 Jul 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts