You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

recourse

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

recourse

Recursive coutility methods, convenience methods/properties.

1.3.2
latest
Source
npmnpm
Version published
Weekly downloads
145
116.42%
Maintainers
1
Weekly downloads
 
Created
Source

➲ Recourse

  • Recursive coutility & convenience methods/properties.
  • Recursively access & mutate properties for targeted or bound objects/arrays/maps.

Used By
 ⁘ Core-Plex
 ❂ Objecture
 ⁜ MVC Framework

Methods

Illustrations

Import Recourse

import { Recourse } from 'recourse'

Then With Some Object/Array/Map

const object = {
  propertyA: [{
    propertyB: {
      propertyC: [3, 33, 333]
    }
  }, {
    propertyD: {
      propertyE: [5, 55, 555]
    }
  }, {
    propertyF: {
      propertyG: new Map([[0, 7], [1, 77], [2, 777]])
    }
  }]
}

get/set/delete Targeted Tensors/Mutators

Recourse.get(object, 'propertyA.0.propertyB.propertyC.0')
Recourse.set(object, 'propertyA.1.propertyD.propertyE.1', "55")
Recourse.delete(object, 'propertyA.2.propertyF.propertyG.2')

get/set/delete

propertyA.0.propertyB.propertyC.0 3
propertyA.1.propertyD.propertyE.1 "55"
propertyA.2.propertyF.propertyG.2 undefined

get/set/delete Bound Tensors/Mutators

const recourseObject = new Recourse(object)
recourseObject.get('propertyA.0.propertyB.propertyC.2')
recourseObject.set('propertyA.1.propertyD.propertyE.2', "555")
recourseObject.delete('propertyA.2.propertyF.propertyG.2')

get/set/delete

propertyA.0.propertyB.propertyC.2 333
propertyA.1.propertyD.propertyE.2 555
propertyA.2.propertyF.propertyG.2 undefined

Keywords

abstract syntax tree

FAQs

Package last updated on 06 Aug 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

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.