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

@teclone/utils

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@teclone/utils

A collection of day-to-day utility methods usable in both node and browser environments

latest
Source
npmnpm
Version
2.26.1
Version published
Maintainers
1
Created
Source

Utils

Build Status Coverage Status semantic-release npm version npm

Utils is a collection of utility methods for day to day web application and library development. It is developed for reusability purposes as it is utilized by most of all libraries published by same author.

If you bumped into this project and find it useful for your project, please don't hesitate to give us a star. Because it is a typescript project, you get excellent auto-completion and type checks.

Installation

npm install @teclone/utils

Usage Sample

import { scopeCallback, camelCase, copy, range, expandProperty } from '@teclone/utils';

console.log(camelCase('my-string')); //logs myString
console.log(camelCase('my:string', ':')); //logs myString

//copy objects without creating references
const myObject = {
  headers: {
    contentType: 'text/html',
  },
  colors: ['#fff', 'green', '#808080'],
};
const myObjectCopy = copy({}, myObject);

//changing headers does not change the copy
myObject.headers.contentType = 'text/css';
console.log(myObjectCopy.headers.contentType); //logs text/html

// expand property into a target object
const result = expandProperty({}, 'headers.contentType', 'text/css');
console.log(result.headers.contentType); // logs text/css

Keywords

utility-methods

FAQs

Package last updated on 26 Dec 2021

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