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

obj-case

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

obj-case

Work with objects of different cased keys

  • 0.0.5
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is obj-case?

The obj-case npm package provides utilities for manipulating and accessing properties within JavaScript objects using dot notation. It simplifies the process of getting, setting, and deleting nested properties.

What are obj-case's main functionalities?

Get Property

This feature allows you to retrieve the value of a nested property within an object using a dot-notated string.

const objCase = require('obj-case');
const obj = { a: { b: { c: 42 } } };
const value = objCase.get(obj, 'a.b.c');
console.log(value); // 42

Set Property

This feature allows you to set the value of a nested property within an object using a dot-notated string.

const objCase = require('obj-case');
const obj = { a: { b: { } } };
objCase.set(obj, 'a.b.c', 42);
console.log(obj); // { a: { b: { c: 42 } } }

Delete Property

This feature allows you to delete a nested property within an object using a dot-notated string.

const objCase = require('obj-case');
const obj = { a: { b: { c: 42 } } };
objCase.del(obj, 'a.b.c');
console.log(obj); // { a: { b: { } } }

Other packages similar to obj-case

Keywords

FAQs

Package last updated on 19 Dec 2013

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