Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@acrool/js-utils

Package Overview
Dependencies
Maintainers
0
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@acrool/js-utils

Common javascript utils methods for project development

  • 3.2.12-alpha.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
40
decreased by-47.37%
Maintainers
0
Weekly downloads
 
Created
Source

Acrool JS Utils

Acrool JS Utils Logo

This is a commonly used JS toolbox, designed to facilitate rapid daily development.

NPM npm

npm downloads npm

Features

type use strictNullChecks and strictNullChecks

  • Array - Methods related to handling arrays, such as groupBy, unique, deleting arrays, and immutable methods for adding to arrays.
  • Browser - Queries related to browser functionalities, such as console.log, scroll height, window clientHeight.
  • Convert - Type conversion, color code format conversion, file to base64, base64 to blob.
  • Date - Handling date ranges, simplifying date display, converting total seconds into hours, minutes, and seconds, etc.
  • Dom - Handling functions related to the DOM, such as manipulating Class, inserting iFrame, inserting Script, copying to clipboard, downloading blob.
  • Equal - Determining if it's empty (including 0, empty array, blank string, null, empty object), whether it's JSON, and Compose matching.
  • Number - Handling currency formatting, decimal point retention, and obtaining the difference between two ranges.
  • Object - Handling enhanced type support for Object.keys, retaining true properties in an Object, inverting objects, and so on.
  • String - Processing of strings, such as case conversion to camel case, enhanced string splitting, and so on.
  • Uri - Handling URL-related tasks, such as encoding & decoding QueryString, obtaining the main domain, subdomain, and so on.

Installation

date dependencies dayjs library

yarn add @acrool/js-utils

Examples

These are examples of imports for various types. Refer to the documentation inside each library for other methods.

import {groupBy} from '@acrool/js-utils/array';
import {getScrollHeight} from '@acrool/js-utils/browser';
import {emptyToNull} from '@acrool/js-utils/convert';
import {simpleDate} from '@acrool/js-utils/date';
import {copyToClipboard} from '@acrool/js-utils/dom';
import {isEmpty, isNotEmpty} from '@acrool/js-utils/equal';
import {formatCurrency} from '@acrool/js-utils/number';
import {objectKeys} from '@acrool/js-utils/object';
import {removeHtmlTag} from '@acrool/js-utils/string';
import {decodeQueryString} from '@acrool/js-utils/uri';
import {delay} from '@acrool/js-utils/prmoise';

Add module

./build-post-processors.js

Publishing

$ yarn build && npm publish ./dist --access=public

License

MIT © Acrool & Imagine

Keywords

FAQs

Package last updated on 30 Sep 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc