JSPM

jsutils-ext

1.0.1
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 1
    • Score
      100M100P100Q27952F
    • License ISC

    js 工具类/日期时间、LocalStorage等...

    Package Exports

    • jsutils-ext

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (jsutils-ext) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    jsutils-ext

    纯 js 的工具类,包含了日期时间、LocalStorage、LocationHref 等等...

    npm i jsutils-ext -s

    import { FormatDate } from "jsutils-ext"
    // 日期格式化
    FormatDate.date(new Date()) // 2019-09-30
    // 日期时间格式化
    FormatDate.dateTimes(new Date(), "/") // 2019/09/30 14:23:56
    // 获取【今天】前一天日期
    FormatDate.dateAfter(new Date()) // 29

    API

    方法 说明
    FormatDate 日期/时间格式化
    LocalStorage 获取/存储/删除 LocalStorage 中数据
    LocationHref 回去浏览器地址栏,href 地址?号后面参数

    说明:如何出现报错,请检查版本是否正确。