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

@nevware21/ts-utils

Package Overview
Dependencies
Maintainers
2
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nevware21/ts-utils

Common JavaScript/TypeScript helper functions for better minification

  • 0.11.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
270K
decreased by-18.83%
Maintainers
2
Weekly downloads
 
Created

What is @nevware21/ts-utils?

@nevware21/ts-utils is a utility library for TypeScript that provides a variety of helper functions and utilities to simplify common programming tasks. It includes features for object manipulation, array operations, type checking, and more.

What are @nevware21/ts-utils's main functionalities?

Object Manipulation

The `objMap` function allows you to transform the values of an object based on a provided mapping function.

const obj = { a: 1, b: 2, c: 3 };
const newObj = objMap(obj, (value, key) => value * 2);
console.log(newObj); // { a: 2, b: 4, c: 6 }

Array Operations

The `arrayMap` function is similar to JavaScript's native `map` function but provides additional type safety and utility.

const arr = [1, 2, 3, 4];
const newArr = arrayMap(arr, (value) => value * 2);
console.log(newArr); // [2, 4, 6, 8]

Type Checking

The `isString` function is a type guard that checks if a value is a string, providing better type safety in TypeScript.

const value = 'hello';
if (isString(value)) {
  console.log('Value is a string');
}

Deep Cloning

The `deepClone` function creates a deep copy of an object, ensuring that nested objects are also cloned.

const obj = { a: 1, b: { c: 2 } };
const clonedObj = deepClone(obj);
console.log(clonedObj); // { a: 1, b: { c: 2 } }

Other packages similar to @nevware21/ts-utils

Keywords

FAQs

Package last updated on 24 Oct 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