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

simple-utils123

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simple-utils123

A simple utility package with basic functions

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

Simple Utils

A simple utility package with basic functions for everyday use.

Installation

npm install simple-utils

Usage

const { capitalize, random, isEmpty } = require('simple-utils');

// Capitalize a string
console.log(capitalize('hello')); // Output: 'Hello'

// Generate a random number between 1 and 10
console.log(random(1, 10)); // Output: random number between 1 and 10

// Check if a value is empty
console.log(isEmpty('')); // Output: true
console.log(isEmpty([])); // Output: true
console.log(isEmpty({})); // Output: true
console.log(isEmpty('hello')); // Output: false

Functions

  • capitalize(str): Capitalizes the first letter of a string
  • random(min, max): Generates a random number between min and max (inclusive)
  • isEmpty(value): Checks if a value is empty (null, undefined, empty string, empty array, or empty object)

License

MIT

Keywords

utils

FAQs

Package last updated on 16 Apr 2025

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