@shihongxins/jsutils
TypeScript icon, indicating that this package has built-in type declarations

1.2.1 • Public • Published

@shihongxins/jsutils

Personal Javascript Utils Library by shihongxins.

Installation

  pnpm add @shihongxins/jsutils

Usage

ESModule

import { ColorUtils } from "@shihongxins/jsutils";
console.log(ColorUtils.hex2rgb("#ff0000"));
// output "rgb(255, 0, 0)"

CommonJS

const SHXsJSUtils = require("@shihongxins/jsutils");
console.log(SHXsJSUtils.DateUtils.nativeFormat(new Date(1678607231000), "YYYY-MM-DD"));
// output 2023-03-12

Browser

<script src="node_modules/@shihongxins/jsutils/lib/bundle.browser.js"></script>
<script>
  console.log(window.SHXsJSUtils.ElementUtils.isDocumentInFullscreenMode());
  // false
</script>

Readme

Keywords

Package Sidebar

Install

npm i @shihongxins/jsutils

Weekly Downloads

1

Version

1.2.1

License

ISC

Unpacked Size

42.8 kB

Total Files

5

Last publish

Collaborators

  • shihongxins