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

@practicaloptimism/program-utility

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@practicaloptimism/program-utility

A set of useful algorithms and data structures for computer programs

  • 0.0.1
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Program Utility

A few algorithms and data structures for accessing property values of objects by using a property key name list. Also available, you may create a deep copy of objects and/or track the copies by using the ObjectDuplicator data structure.

Resource Websites: Source Code | Demos | Video Introduction | Video Tutorial | Live Programming Development Journal
This Documentation Page was last Updated on Wed Jun 10 2020 06:15:19 GMT-0500 (Central Daylight Time)
Project Development Status Updates

npm version downloads coverage report pipeline status

Installation

Node Package Manager (NPM) Installation
npm install --save @practicaloptimism/program-utility
Script import from JavaScript (requires NPM installation)
import * as programUtility from '@practicaloptimism/program-utility'
HTML Script Import
<script src="https://unpkg.com/@practicaloptimism/program-utility"></script>

Getting Started: Accessing Object Property Value

// Initialize the javascript library instance and the usecase property value
const programUtilityInstance = programUtility.consumer.javascript.algorithms.createJavascriptLibraryInstance.function()
const objectUtility =  programUtilityInstance.usecase.objectUtility

// Create your javascript object
const object = { name: 'Hitomi', hobbyTable: { dancing: true, watchingScaryMovies: false } }

// Create your property value key list
const propertyKeyList = ['hobbyTable', 'dancing']

// Get your object property value using a key list
const propertyValue = objectUtility.algorithms.object.getObjectValue.function(object, propertyKeyList)

// The value printed should return 'true'
console.log(propertyValue)

Getting Started: Creating Object Duplicators

// Initialize the javascript library instance and the usecase property value
const programUtilityInstance = programUtility.consumer.javascript.algorithms.createJavascriptLibraryInstance.function()
const  objectUtility =  programUtilityInstance.usecase.objectUtility

// Create your javascript object
const object = { name: 'Miranda', hobbyTable: { watchingScaryMovies: true, watchingDanceRecitals: false } }

// Create your ObjectDuplicator data structure
const objectDuplicator = objectUtility.algorithms.objectDuplicator.createObjectDuplicator.function(object)

// Add a duplicate of your object
objectUtility.algorithms.objectDuplicator.addObjectToObjectDuplicator.function(objectDuplicator, 'item1')

// Get the duplicate of your object by using a sting value (objectDuplicateId)
const objectDuplicate = objectUtility.algorithms.objectDuplicator.getObjectFromObjectDuplicator.function('item1')

// Change the 'name' property value of the object duplicate
// to showcase that the object and object duplicate
// will have different names since they are deep copies
// of one another.
objectDuplicate.name = 'Susan'

// The value printed should return 'false'
console.log(object.name === objectDuplicate.name)

Application Programmable Interface (API Reference)

📁 Application Programmable Interface (API Reference) - Click to Open
📁 @Project

@Project

📁 Constants

Constants

📁 Project

Project

📁 DataStructures

DataStructures

📁 Extract

Extract

PROJECT_DOCUMENTATION_FILE_PATH_DIRECTORY_NAME

precompiled/@project/data-structures/extract
📁 PROJECT_DATA_STRUCTURE_NAME_LIST

PROJECT_DATA_STRUCTURE_NAME_LIST

0

ProjectExtract

1

ProjectUsecaseExtract

PROJECT_DOCUMENTATION_INDEX_FILE_CONTENT

undefined
📁 Consumer

Consumer

📁 DocumentationInterface

DocumentationInterface

📁 Usecase

Usecase

📁 ObjectUtility

ObjectUtility

📁 Algorithms

Algorithms

📁 Object

Object

📁 CreateObjectDeepCopy

CreateObjectDeepCopy

PROJECT_DOCUMENTATION_TEXT_HEADER

createObjectDeepCopy

PROJECT_DOCUMENTATION_TEXT_DESCRIPTION

This function copies an existing object and makes a copy where the child objects don't reference one another in memory.

PROJECT_DOCUMENTATION_FILE_PATH_DIRECTORY_NAME

precompiled/usecase/object-utility/algorithms/object/create-object-deep-copy

PROJECT_ALGORITHM_NAME

getObjectValue
📁 PROJECT_ALGORITHM_PARAMETER_LIST

PROJECT_ALGORITHM_PARAMETER_LIST

📁 0

0

ParameterName

object

ParameterType

any|Object
📁 ParameterExampleList

ParameterExampleList

0

{ "name": "Patrick Morrison", "address": { "city": "Beijing" } }
📁 1

1

ParameterName

propertyKeyNameList

ParameterType

string[]
📁 ParameterExampleList

ParameterExampleList

0

['address', 'city']
📁 PROJECT_ALGORITHM_RETURN_PARAMETER_LIST

PROJECT_ALGORITHM_RETURN_PARAMETER_LIST

📁 0

0

ParameterName

objectPropertyValue

ParameterType

any
📁 ParameterExampleList

ParameterExampleList

0

"Beijing"
📁 PROJECT_ALGORITHM_EXAMPLE_USECASE_LIST

PROJECT_ALGORITHM_EXAMPLE_USECASE_LIST

📁 0

0

ProjectExampleUsecaseTitle

Getting Started: Function call example usecase

ProjectExampleUsecaseSourceCodeTextDescription

getObjectValue.function(object, propertyKeyNameList)
📁 1

1

ProjectExampleUsecaseTitle

Getting Started: Application context example usecase

ProjectExampleTextDescription

// Create a javascript library instance for your project const myProjectObjectUtility = objectUtility.consumer.javascript.algorithms.createJavascriptLibraryInstance.function('my-project-id') // Initialize a javascript object const myObject = { name: 'Claire', favoriteActivitiesTable: { dancing: { activityName: 'Dancing', placesVisitedToPerformActivity: ['New York', 'Los Angelos'], firstMemoryPerformingActivity: { placePerformedActivity: 'New York' } } }} // Retrieve the property value of myObject by using a property key name list const placePerformedActivityDuringFirstMemory = myProjectObjectUtility.usecase.objectUtility.algorithms.getObjectValue.function(myObject, ['favoriteActivitiesTable', 'dancing', 'firstMemoryPerformingActivity', 'placePerformedActivity']) // Print the place where the first memory of the dancing activity occurred as it is one of Claire's favorite activities console.log('The following should be "New York": ', placePerformedActivityDuringFirstMemory)
📁 PROJECT_DOCUMENTATION_INDEX_FILE_CONTENT

PROJECT_DOCUMENTATION_INDEX_FILE_CONTENT

📁 CreateObjectDeepCopy

CreateObjectDeepCopy

Function

function createObjectDeepCopyFunction(object, option) { if (typeof object !== 'object') { return; } if (option && option.deepObjectClonePropertyTreeHeight === 0) { return object; } const newObject = {}; let objectPropertyKeyNameList = []; const originalObjectPropertyKeyNameList = Object.keys(object).map(objectPropertyKeyName => [objectPropertyKeyName]); objectPropertyKeyNameList = objectPropertyKeyNameList.concat(originalObjectPropertyKeyNameList); for (let i = 0; i < objectPropertyKeyNameList.length; i++) { const propertyKeyNameList = objectPropertyKeyNameList[i]; const objectPropertyValue = _get_object_value__WEBPACK_IMPORTED_MODULE_0__["getObjectValue"].function(object, propertyKeyNameList); if ((option && option.deepObjectClonePropertyTreeHeight !== undefined) && ((propertyKeyNameList.length > option.deepObjectClonePropertyTreeHeight) || ((typeof objectPropertyValue === 'object') && (propertyKeyNameList.length + 1 > option.deepObjectClonePropertyTreeHeight)))) { _update_object_value__WEBPACK_IMPORTED_MODULE_1__["updateObjectValue"].function(newObject, propertyKeyNameList, objectPropertyValue); continue; } if (typeof objectPropertyValue === 'object') { let childObjectPropertyKeyNameList; if (Array.isArray(objectPropertyValue)) { childObjectPropertyKeyNameList = objectPropertyValue.map((_objectPropertyKeyValue, index) => [...propertyKeyNameList, index]); } else { childObjectPropertyKeyNameList = Object.keys(objectPropertyValue).map(objectPropertyKeyName => [...propertyKeyNameList, objectPropertyKeyName]); } objectPropertyKeyNameList = objectPropertyKeyNameList.concat(childObjectPropertyKeyNameList); } else { _update_object_value__WEBPACK_IMPORTED_MODULE_1__["updateObjectValue"].function(newObject, propertyKeyNameList, objectPropertyValue); } } return newObject; }
📁 GetObjectPropertyValueList

GetObjectPropertyValueList

PROJECT_DOCUMENTATION_TEXT_HEADER

createObjectPropertyValueList

PROJECT_DOCUMENTATION_TEXT_DESCRIPTION

This function copies an existing object and makes a copy where the child objects don't reference one another in memory.

PROJECT_DOCUMENTATION_FILE_PATH_DIRECTORY_NAME

precompiled/usecase/object-utility/algorithms/object/create-object-deep-copy

PROJECT_ALGORITHM_NAME

getObjectValue
📁 PROJECT_ALGORITHM_PARAMETER_LIST

PROJECT_ALGORITHM_PARAMETER_LIST

📁 0

0

ParameterName

object

ParameterType

any|Object
📁 ParameterExampleList

ParameterExampleList

0

{ "name": "Patrick Morrison", "address": { "city": "Beijing" } }
📁 1

1

ParameterName

propertyKeyNameList

ParameterType

string[]
📁 ParameterExampleList

ParameterExampleList

0

['address', 'city']
📁 PROJECT_ALGORITHM_RETURN_PARAMETER_LIST

PROJECT_ALGORITHM_RETURN_PARAMETER_LIST

📁 0

0

ParameterName

objectPropertyValue

ParameterType

any
📁 ParameterExampleList

ParameterExampleList

0

"Beijing"
📁 PROJECT_ALGORITHM_EXAMPLE_USECASE_LIST

PROJECT_ALGORITHM_EXAMPLE_USECASE_LIST

📁 0

0

ProjectExampleUsecaseTitle

Getting Started: Function call example usecase

ProjectExampleUsecaseSourceCodeTextDescription

getObjectValue.function(object, propertyKeyNameList)
📁 1

1

ProjectExampleUsecaseTitle

Getting Started: Application context example usecase

ProjectExampleTextDescription

// Create a javascript library instance for your project const myProjectObjectUtility = objectUtility.consumer.javascript.algorithms.createJavascriptLibraryInstance.function('my-project-id') // Initialize a javascript object const myObject = { name: 'Claire', favoriteActivitiesTable: { dancing: { activityName: 'Dancing', placesVisitedToPerformActivity: ['New York', 'Los Angelos'], firstMemoryPerformingActivity: { placePerformedActivity: 'New York' } } }} // Retrieve the property value of myObject by using a property key name list const placePerformedActivityDuringFirstMemory = myProjectObjectUtility.usecase.objectUtility.algorithms.getObjectValue.function(myObject, ['favoriteActivitiesTable', 'dancing', 'firstMemoryPerformingActivity', 'placePerformedActivity']) // Print the place where the first memory of the dancing activity occurred as it is one of Claire's favorite activities console.log('The following should be "New York": ', placePerformedActivityDuringFirstMemory)
📁 PROJECT_DOCUMENTATION_INDEX_FILE_CONTENT

PROJECT_DOCUMENTATION_INDEX_FILE_CONTENT

📁 GetObjectPropertyValueList

GetObjectPropertyValueList

Function

function getObjectPropertyValueListFunction(object, option) { const propertyKeyNameList = _get_object_property_key_name_list__WEBPACK_IMPORTED_MODULE_0__["getObjectPropertyKeyNameList"].function(object, [], option).map((keyList) => { const objectPropertyValue = _get_object_value__WEBPACK_IMPORTED_MODULE_1__["getObjectValue"].function(object, keyList); if (option && option.returnObjectPropertyKeyListPair) { return { objectPropertyKeyList: keyList, objectPropertyValue }; } else { return objectPropertyValue; } }); return propertyKeyNameList; }

FunctionOption

class FunctionOption extends _get_object_property_key_name_list__WEBPACK_IMPORTED_MODULE_0__["FunctionOption"] {
constructor(defaultOption) {
    super(defaultOption);
    Object.assign(this, defaultOption);
}

}

📁 DeleteObjectValue

DeleteObjectValue

PROJECT_DOCUMENTATION_TEXT_HEADER

createObjectDeepCopy

PROJECT_DOCUMENTATION_TEXT_DESCRIPTION

This function copies an existing object and makes a copy where the child objects don't reference one another in memory.

PROJECT_DOCUMENTATION_FILE_PATH_DIRECTORY_NAME

precompiled/usecase/object-utility/algorithms/object/create-object-deep-copy

PROJECT_ALGORITHM_NAME

getObjectValue
📁 PROJECT_ALGORITHM_PARAMETER_LIST

PROJECT_ALGORITHM_PARAMETER_LIST

📁 0

0

ParameterName

object

ParameterType

any|Object
📁 ParameterExampleList

ParameterExampleList

0

{ "name": "Patrick Morrison", "address": { "city": "Beijing" } }
📁 1

1

ParameterName

propertyKeyNameList

ParameterType

string[]
📁 ParameterExampleList

ParameterExampleList

0

['address', 'city']
📁 PROJECT_ALGORITHM_RETURN_PARAMETER_LIST

PROJECT_ALGORITHM_RETURN_PARAMETER_LIST

📁 0

0

ParameterName

objectPropertyValue

ParameterType

any
📁 ParameterExampleList

ParameterExampleList

0

"Beijing"
📁 PROJECT_ALGORITHM_EXAMPLE_USECASE_LIST

PROJECT_ALGORITHM_EXAMPLE_USECASE_LIST

📁 0

0

ProjectExampleUsecaseTitle

Getting Started: Function call example usecase

ProjectExampleUsecaseSourceCodeTextDescription

getObjectValue.function(object, propertyKeyNameList)
📁 1

1

ProjectExampleUsecaseTitle

Getting Started: Application context example usecase

ProjectExampleTextDescription

// Create a javascript library instance for your project const myProjectObjectUtility = objectUtility.consumer.javascript.algorithms.createJavascriptLibraryInstance.function('my-project-id') // Initialize a javascript object const myObject = { name: 'Claire', favoriteActivitiesTable: { dancing: { activityName: 'Dancing', placesVisitedToPerformActivity: ['New York', 'Los Angelos'], firstMemoryPerformingActivity: { placePerformedActivity: 'New York' } } }} // Retrieve the property value of myObject by using a property key name list const placePerformedActivityDuringFirstMemory = myProjectObjectUtility.usecase.objectUtility.algorithms.getObjectValue.function(myObject, ['favoriteActivitiesTable', 'dancing', 'firstMemoryPerformingActivity', 'placePerformedActivity']) // Print the place where the first memory of the dancing activity occurred as it is one of Claire's favorite activities console.log('The following should be "New York": ', placePerformedActivityDuringFirstMemory)
📁 PROJECT_DOCUMENTATION_INDEX_FILE_CONTENT

PROJECT_DOCUMENTATION_INDEX_FILE_CONTENT

📁 DeleteObjectValue

DeleteObjectValue

Function

function deleteObjectValueFunction(object, keyNameList, option) { _update_object_value__WEBPACK_IMPORTED_MODULE_0__["updateObjectValue"].function(object, keyNameList, undefined, option); }

FunctionOption

class FunctionOption {
constructor(defaultOption) {
    Object.assign(this, defaultOption);
}

}

📁 GetObjectPropertyKeyNameList

GetObjectPropertyKeyNameList

PROJECT_DOCUMENTATION_TEXT_HEADER

createObjectDeepCopy

PROJECT_DOCUMENTATION_TEXT_DESCRIPTION

This function copies an existing object and makes a copy where the child objects don't reference one another in memory.

PROJECT_DOCUMENTATION_FILE_PATH_DIRECTORY_NAME

precompiled/usecase/object-utility/algorithms/object/create-object-deep-copy

PROJECT_ALGORITHM_NAME

getObjectValue
📁 PROJECT_ALGORITHM_PARAMETER_LIST

PROJECT_ALGORITHM_PARAMETER_LIST

📁 0

0

ParameterName

object

ParameterType

any|Object
📁 ParameterExampleList

ParameterExampleList

0

{ "name": "Patrick Morrison", "address": { "city": "Beijing" } }
📁 1

1

ParameterName

propertyKeyNameList

ParameterType

string[]
📁 ParameterExampleList

ParameterExampleList

0

['address', 'city']
📁 PROJECT_ALGORITHM_RETURN_PARAMETER_LIST

PROJECT_ALGORITHM_RETURN_PARAMETER_LIST

📁 0

0

ParameterName

objectPropertyValue

ParameterType

any
📁 ParameterExampleList

ParameterExampleList

0

"Beijing"
📁 PROJECT_ALGORITHM_EXAMPLE_USECASE_LIST

PROJECT_ALGORITHM_EXAMPLE_USECASE_LIST

📁 0

0

ProjectExampleUsecaseTitle

Getting Started: Function call example usecase

ProjectExampleUsecaseSourceCodeTextDescription

getObjectValue.function(object, propertyKeyNameList)
📁 1

1

ProjectExampleUsecaseTitle

Getting Started: Application context example usecase

ProjectExampleTextDescription

// Create a javascript library instance for your project const myProjectObjectUtility = objectUtility.consumer.javascript.algorithms.createJavascriptLibraryInstance.function('my-project-id') // Initialize a javascript object const myObject = { name: 'Claire', favoriteActivitiesTable: { dancing: { activityName: 'Dancing', placesVisitedToPerformActivity: ['New York', 'Los Angelos'], firstMemoryPerformingActivity: { placePerformedActivity: 'New York' } } }} // Retrieve the property value of myObject by using a property key name list const placePerformedActivityDuringFirstMemory = myProjectObjectUtility.usecase.objectUtility.algorithms.getObjectValue.function(myObject, ['favoriteActivitiesTable', 'dancing', 'firstMemoryPerformingActivity', 'placePerformedActivity']) // Print the place where the first memory of the dancing activity occurred as it is one of Claire's favorite activities console.log('The following should be "New York": ', placePerformedActivityDuringFirstMemory)
📁 PROJECT_DOCUMENTATION_INDEX_FILE_CONTENT

PROJECT_DOCUMENTATION_INDEX_FILE_CONTENT

📁 GetObjectPropertyKeyNameList

GetObjectPropertyKeyNameList

Function

function getObjectPropertyKeyNameListFunction(object, parentKeyNameList, option) { if (option && option.propertyKeyNameListOrderType === 'depthFirstOrder') { return getObjectPropertyKeyNameListByDepthFirstOrderFunction(object, parentKeyNameList, option); } else { return getObjectPropertyKeyNameListByBreadthFirstOrderFunction(object, parentKeyNameList, option); } }

FunctionOption

class FunctionOption {
constructor(defaultOption) {
    Object.assign(this, defaultOption);
}

}

GetObjectPropertyKeyNameListByDepthFirstOrderFunction

function getObjectPropertyKeyNameListByDepthFirstOrderFunction(object, parentKeyNameList, option) { if (!object) { return []; } if (typeof object !== 'object') { return []; } if (!parentKeyNameList || parentKeyNameList.length < 0) { parentKeyNameList = []; } let propertyKeyNameList = []; if ((parentKeyNameList.length > 0) && (option ? !option.booleanObjectKeyNotAllowed : true)) { propertyKeyNameList.push(parentKeyNameList); } for (let objectKey in object) { if (!object.hasOwnProperty(objectKey)) { continue; } const objectPropertyKeyNameList = [...parentKeyNameList, objectKey]; if (option && (option.objectPropertyTreeHeight !== undefined) && (objectPropertyKeyNameList.length > option.objectPropertyTreeHeight)) { return []; } if (typeof object[objectKey] !== 'object') { propertyKeyNameList.push(objectPropertyKeyNameList); continue; } propertyKeyNameList.push(...getObjectPropertyKeyNameListByDepthFirstOrderFunction(object[objectKey], objectPropertyKeyNameList, option)); } return propertyKeyNameList; }

GetObjectPropertyKeyNameListByBreadthFirstOrderFunction

function getObjectPropertyKeyNameListByBreadthFirstOrderFunction(object, parentKeyNameList, option) { if (!object) { return []; } if (typeof object !== 'object') { return []; } if (!parentKeyNameList || parentKeyNameList.length < 0) { parentKeyNameList = []; } let propertyKeyNameList = Object.keys(object).map(objectKey => { const propertyKeyName = Array.isArray(object) ? parseInt(objectKey, 10) : objectKey; return parentKeyNameList.concat(propertyKeyName); }); let removeObjectKeyNameListReferenceTable = {}; if (option && (option.objectPropertyTreeHeight !== undefined) && (propertyKeyNameList[0].length > option.objectPropertyTreeHeight)) { return []; } for (let i = 0; i < propertyKeyNameList.length; i++) { const objectPropertyKeyNameList = propertyKeyNameList[i]; const objectChildObjectValue = get_object_value__WEBPACK_IMPORTED_MODULE_0_["getObjectValue"].function(object, objectPropertyKeyNameList); const objectChildPropertyKeyNameList = getObjectPropertyKeyNameListByBreadthFirstOrderFunction(objectChildObjectValue, objectPropertyKeyNameList, option); if (option && option.booleanObjectKeyNotAllowed && typeof objectChildObjectValue === 'object') { removeObjectKeyNameListReferenceTable[i] = true; } propertyKeyNameList.push(...objectChildPropertyKeyNameList); } const propertyKeyNameListWithoutObjectKey = []; if (option && option.booleanObjectKeyNotAllowed) { for (let i = 0; i < propertyKeyNameList.length; i++) { const removeKeyNameListIndex = removeObjectKeyNameListReferenceTable[i]; if (removeKeyNameListIndex) { continue; } propertyKeyNameListWithoutObjectKey.push(propertyKeyNameList[i]); } propertyKeyNameList = propertyKeyNameListWithoutObjectKey; } return propertyKeyNameList; }

📁 GetObjectValue

GetObjectValue

PROJECT_DOCUMENTATION_TEXT_HEADER

createObjectDeepCopy

PROJECT_DOCUMENTATION_TEXT_DESCRIPTION

This function copies an existing object and makes a copy where the child objects don't reference one another in memory.

PROJECT_DOCUMENTATION_FILE_PATH_DIRECTORY_NAME

precompiled/usecase/object-utility/algorithms/object/create-object-deep-copy

PROJECT_ALGORITHM_NAME

getObjectValue
📁 PROJECT_ALGORITHM_PARAMETER_LIST

PROJECT_ALGORITHM_PARAMETER_LIST

📁 0

0

ParameterName

object

ParameterType

any|Object
📁 ParameterExampleList

ParameterExampleList

0

{ "name": "Patrick Morrison", "address": { "city": "Beijing" } }
📁 1

1

ParameterName

propertyKeyNameList

ParameterType

string[]
📁 ParameterExampleList

ParameterExampleList

0

['address', 'city']
📁 PROJECT_ALGORITHM_RETURN_PARAMETER_LIST

PROJECT_ALGORITHM_RETURN_PARAMETER_LIST

📁 0

0

ParameterName

objectPropertyValue

ParameterType

any
📁 ParameterExampleList

ParameterExampleList

0

"Beijing"
📁 PROJECT_ALGORITHM_EXAMPLE_USECASE_LIST

PROJECT_ALGORITHM_EXAMPLE_USECASE_LIST

📁 0

0

ProjectExampleUsecaseTitle

Getting Started: Function call example usecase

ProjectExampleUsecaseSourceCodeTextDescription

getObjectValue.function(object, propertyKeyNameList)
📁 1

1

ProjectExampleUsecaseTitle

Getting Started: Application context example usecase

ProjectExampleTextDescription

// Create a javascript library instance for your project const myProjectObjectUtility = objectUtility.consumer.javascript.algorithms.createJavascriptLibraryInstance.function('my-project-id') // Initialize a javascript object const myObject = { name: 'Claire', favoriteActivitiesTable: { dancing: { activityName: 'Dancing', placesVisitedToPerformActivity: ['New York', 'Los Angelos'], firstMemoryPerformingActivity: { placePerformedActivity: 'New York' } } }} // Retrieve the property value of myObject by using a property key name list const placePerformedActivityDuringFirstMemory = myProjectObjectUtility.usecase.objectUtility.algorithms.getObjectValue.function(myObject, ['favoriteActivitiesTable', 'dancing', 'firstMemoryPerformingActivity', 'placePerformedActivity']) // Print the place where the first memory of the dancing activity occurred as it is one of Claire's favorite activities console.log('The following should be "New York": ', placePerformedActivityDuringFirstMemory)
📁 PROJECT_DOCUMENTATION_INDEX_FILE_CONTENT

PROJECT_DOCUMENTATION_INDEX_FILE_CONTENT

📁 GetObjectValue

GetObjectValue

Function

function getObjectValueFunction(object, propertyKeyNameList) { if (!object) { return undefined; } if (propertyKeyNameList.length === 0) { return object; } if (!object[propertyKeyNameList[0]]) { return undefined; } if (propertyKeyNameList.length === 1) { return object[propertyKeyNameList[0]]; } return getObjectValueFunction(object[propertyKeyNameList[0]], propertyKeyNameList.slice(1)); }
📁 IsObjectDeepEqual

IsObjectDeepEqual

PROJECT_DOCUMENTATION_TEXT_HEADER

createObjectDeepCopy

PROJECT_DOCUMENTATION_TEXT_DESCRIPTION

This function copies an existing object and makes a copy where the child objects don't reference one another in memory.

PROJECT_DOCUMENTATION_FILE_PATH_DIRECTORY_NAME

precompiled/usecase/object-utility/algorithms/object/create-object-deep-copy

PROJECT_ALGORITHM_NAME

getObjectValue
📁 PROJECT_ALGORITHM_PARAMETER_LIST

PROJECT_ALGORITHM_PARAMETER_LIST

📁 0

0

ParameterName

object

ParameterType

any|Object
📁 ParameterExampleList

ParameterExampleList

0

{ "name": "Patrick Morrison", "address": { "city": "Beijing" } }
📁 1

1

ParameterName

propertyKeyNameList

ParameterType

string[]
📁 ParameterExampleList

ParameterExampleList

0

['address', 'city']
📁 PROJECT_ALGORITHM_RETURN_PARAMETER_LIST

PROJECT_ALGORITHM_RETURN_PARAMETER_LIST

📁 0

0

ParameterName

objectPropertyValue

ParameterType

any
📁 ParameterExampleList

ParameterExampleList

0

"Beijing"
📁 PROJECT_ALGORITHM_EXAMPLE_USECASE_LIST

PROJECT_ALGORITHM_EXAMPLE_USECASE_LIST

📁 0

0

ProjectExampleUsecaseTitle

Getting Started: Function call example usecase

ProjectExampleUsecaseSourceCodeTextDescription

getObjectValue.function(object, propertyKeyNameList)
📁 1

1

ProjectExampleUsecaseTitle

Getting Started: Application context example usecase

ProjectExampleTextDescription

// Create a javascript library instance for your project const myProjectObjectUtility = objectUtility.consumer.javascript.algorithms.createJavascriptLibraryInstance.function('my-project-id') // Initialize a javascript object const myObject = { name: 'Claire', favoriteActivitiesTable: { dancing: { activityName: 'Dancing', placesVisitedToPerformActivity: ['New York', 'Los Angelos'], firstMemoryPerformingActivity: { placePerformedActivity: 'New York' } } }} // Retrieve the property value of myObject by using a property key name list const placePerformedActivityDuringFirstMemory = myProjectObjectUtility.usecase.objectUtility.algorithms.getObjectValue.function(myObject, ['favoriteActivitiesTable', 'dancing', 'firstMemoryPerformingActivity', 'placePerformedActivity']) // Print the place where the first memory of the dancing activity occurred as it is one of Claire's favorite activities console.log('The following should be "New York": ', placePerformedActivityDuringFirstMemory)
📁 PROJECT_DOCUMENTATION_INDEX_FILE_CONTENT

PROJECT_DOCUMENTATION_INDEX_FILE_CONTENT

📁 IsObjectDeepEqual

IsObjectDeepEqual

Function

function isObjectDeepEqualFunction(object1, object2) { if (typeof object1 !== 'object') { return false; } if (typeof object1 !== typeof object2) { return false; } if (((object1 instanceof Array) && !(object2 instanceof Array)) || (!(object1 instanceof Array) && (object2 instanceof Array))) { return false; } for (let propertyKeyName in object1) { if (!object1.hasOwnProperty(propertyKeyName)) { continue; } if (!object2.hasOwnProperty(propertyKeyName)) { return false; } if (typeof object1[propertyKeyName] === 'object') { continue; } if (object1[propertyKeyName] !== object2[propertyKeyName]) { return false; } } for (let propertyKeyName in object2) { if (!object2.hasOwnProperty(propertyKeyName)) { continue; } if (!object1.hasOwnProperty(propertyKeyName)) { return false; } if (typeof object2[propertyKeyName] === 'object') { continue; } if (object2[propertyKeyName] !== object2[propertyKeyName]) { return false; } } return true; }
📁 UpdateObjectValue

UpdateObjectValue

PROJECT_DOCUMENTATION_TEXT_HEADER

createObjectDeepCopy

PROJECT_DOCUMENTATION_TEXT_DESCRIPTION

This function copies an existing object and makes a copy where the child objects don't reference one another in memory.

PROJECT_DOCUMENTATION_FILE_PATH_DIRECTORY_NAME

precompiled/usecase/object-utility/algorithms/object/create-object-deep-copy

PROJECT_ALGORITHM_NAME

getObjectValue
📁 PROJECT_ALGORITHM_PARAMETER_LIST

PROJECT_ALGORITHM_PARAMETER_LIST

📁 0

0

ParameterName

object

ParameterType

any|Object
📁 ParameterExampleList

ParameterExampleList

0

{ "name": "Patrick Morrison", "address": { "city": "Beijing" } }
📁 1

1

ParameterName

propertyKeyNameList

ParameterType

string[]
📁 ParameterExampleList

ParameterExampleList

0

['address', 'city']
📁 PROJECT_ALGORITHM_RETURN_PARAMETER_LIST

PROJECT_ALGORITHM_RETURN_PARAMETER_LIST

📁 0

0

ParameterName

objectPropertyValue

ParameterType

any
📁 ParameterExampleList

ParameterExampleList

0

"Beijing"
📁 PROJECT_ALGORITHM_EXAMPLE_USECASE_LIST

PROJECT_ALGORITHM_EXAMPLE_USECASE_LIST

📁 0

0

ProjectExampleUsecaseTitle

Getting Started: Function call example usecase

ProjectExampleUsecaseSourceCodeTextDescription

getObjectValue.function(object, propertyKeyNameList)
📁 1

1

ProjectExampleUsecaseTitle

Getting Started: Application context example usecase

ProjectExampleTextDescription

// Create a javascript library instance for your project const myProjectObjectUtility = objectUtility.consumer.javascript.algorithms.createJavascriptLibraryInstance.function('my-project-id') // Initialize a javascript object const myObject = { name: 'Claire', favoriteActivitiesTable: { dancing: { activityName: 'Dancing', placesVisitedToPerformActivity: ['New York', 'Los Angelos'], firstMemoryPerformingActivity: { placePerformedActivity: 'New York' } } }} // Retrieve the property value of myObject by using a property key name list const placePerformedActivityDuringFirstMemory = myProjectObjectUtility.usecase.objectUtility.algorithms.getObjectValue.function(myObject, ['favoriteActivitiesTable', 'dancing', 'firstMemoryPerformingActivity', 'placePerformedActivity']) // Print the place where the first memory of the dancing activity occurred as it is one of Claire's favorite activities console.log('The following should be "New York": ', placePerformedActivityDuringFirstMemory)
📁 PROJECT_DOCUMENTATION_INDEX_FILE_CONTENT

PROJECT_DOCUMENTATION_INDEX_FILE_CONTENT

📁 UpdateObjectValue

UpdateObjectValue

Function

function updateObjectValueFunction(object, keyNameList, value, option) { if (!object) { if (typeof keyNameList[0] === 'number') { object = (new Array(keyNameList[0] + 1)).fill(undefined); } else { object = {}; } } if (keyNameList.length === 0) { return object; } let objectValue = value; if (keyNameList.length !== 1) { objectValue = updateObjectValueFunction(object[keyNameList[0]], keyNameList.slice(1), value, option); } if (typeof object === 'object') { object[keyNameList[0]] = objectValue; } else if (typeof object === 'string') { const updateIndex = keyNameList[0]; if (option && option.replaceStringObjectAtKeyIndex) { object = [object.slice(0, updateIndex), objectValue, object.slice(updateIndex + objectValue.length)].join(''); } else { object = object.slice(0, updateIndex) + objectValue + object.slice(updateIndex); } } if ((option && option.deletePropertyKey) && (objectValue === undefined)) { delete object[keyNameList[0]]; } return object; }

FunctionOption

class FunctionOption {
constructor(defaultOption) {
    Object.assign(this, defaultOption);
}

}

📁 UpdateObjectValueByMapFunction

UpdateObjectValueByMapFunction

PROJECT_DOCUMENTATION_TEXT_HEADER

createObjectDeepCopy

PROJECT_DOCUMENTATION_TEXT_DESCRIPTION

This function copies an existing object and makes a copy where the child objects don't reference one another in memory.

PROJECT_DOCUMENTATION_FILE_PATH_DIRECTORY_NAME

precompiled/usecase/object-utility/algorithms/object/create-object-deep-copy

PROJECT_ALGORITHM_NAME

getObjectValue
📁 PROJECT_ALGORITHM_PARAMETER_LIST

PROJECT_ALGORITHM_PARAMETER_LIST

📁 0

0

ParameterName

object

ParameterType

any|Object
📁 ParameterExampleList

ParameterExampleList

0

{ "name": "Patrick Morrison", "address": { "city": "Beijing" } }
📁 1

1

ParameterName

propertyKeyNameList

ParameterType

string[]
📁 ParameterExampleList

ParameterExampleList

0

['address', 'city']
📁 PROJECT_ALGORITHM_RETURN_PARAMETER_LIST

PROJECT_ALGORITHM_RETURN_PARAMETER_LIST

📁 0

0

ParameterName

objectPropertyValue

ParameterType

any
📁 ParameterExampleList

ParameterExampleList

0

"Beijing"
📁 PROJECT_ALGORITHM_EXAMPLE_USECASE_LIST

PROJECT_ALGORITHM_EXAMPLE_USECASE_LIST

📁 0

0

ProjectExampleUsecaseTitle

Getting Started: Function call example usecase

ProjectExampleUsecaseSourceCodeTextDescription

getObjectValue.function(object, propertyKeyNameList)
📁 1

1

ProjectExampleUsecaseTitle

Getting Started: Application context example usecase

ProjectExampleTextDescription

// Create a javascript library instance for your project const myProjectObjectUtility = objectUtility.consumer.javascript.algorithms.createJavascriptLibraryInstance.function('my-project-id') // Initialize a javascript object const myObject = { name: 'Claire', favoriteActivitiesTable: { dancing: { activityName: 'Dancing', placesVisitedToPerformActivity: ['New York', 'Los Angelos'], firstMemoryPerformingActivity: { placePerformedActivity: 'New York' } } }} // Retrieve the property value of myObject by using a property key name list const placePerformedActivityDuringFirstMemory = myProjectObjectUtility.usecase.objectUtility.algorithms.getObjectValue.function(myObject, ['favoriteActivitiesTable', 'dancing', 'firstMemoryPerformingActivity', 'placePerformedActivity']) // Print the place where the first memory of the dancing activity occurred as it is one of Claire's favorite activities console.log('The following should be "New York": ', placePerformedActivityDuringFirstMemory)
📁 PROJECT_DOCUMENTATION_INDEX_FILE_CONTENT

PROJECT_DOCUMENTATION_INDEX_FILE_CONTENT

📁 UpdateObjectValueByMapFunction

UpdateObjectValueByMapFunction

Function

function updateObjectValueByMapFunctionFunction(object, mapFunction, option) { if (option && option.shouldCreateDeepObjectClone) { object = _create_object_deep_copy__WEBPACK_IMPORTED_MODULE_0__["createObjectDeepCopy"].function(object, option); } const objectMapResultList = _get_object_property_key_name_list__WEBPACK_IMPORTED_MODULE_2__["getObjectPropertyKeyNameList"].function(object, [], option).map((originalObjectPropertyKeyList, listIndex) => { let objectPropertyKeyList = originalObjectPropertyKeyList; let objectPropertyValue; const objectMapResult = mapFunction(objectPropertyKeyList, _get_object_value__WEBPACK_IMPORTED_MODULE_1__["getObjectValue"].function(object, objectPropertyKeyList), listIndex); if (typeof objectMapResult === 'object' && (objectMapResult.objectPropertyKey || objectMapResult.objectPropertyValue)) { if (objectPropertyKeyList !== objectMapResult.propertyKey && objectMapResult.propertyKey !== '') { _delete_object_value__WEBPACK_IMPORTED_MODULE_3__["deleteObjectValue"].function(object, objectPropertyKeyList); } objectPropertyKeyList = objectMapResult.objectPropertyKeyList || objectPropertyKeyList; objectPropertyValue = objectMapResult.objectPropertyValue; } else { objectPropertyValue = objectMapResult; } return { objectPropertyKeyList, objectPropertyValue }; }); for (let objectMapResultListIndex = 0; objectMapResultListIndex < objectMapResultList.length; objectMapResultListIndex++) { _update_object_value__WEBPACK_IMPORTED_MODULE_4__["updateObjectValue"].function(object, objectMapResultList[objectMapResultListIndex].objectPropertyKeyList, objectMapResultList[objectMapResultListIndex].objectPropertyValue); } return object; }
📁 ObjectDuplicator

ObjectDuplicator

📁 AddObjectToObjectDuplicator

AddObjectToObjectDuplicator

PROJECT_DOCUMENTATION_FILE_PATH_DIRECTORY_NAME

precompiled/usecase/object-utility/algorithms/object/create-object-deep-copy

PROJECT_ALGORITHM_NAME

getObjectValue
📁 PROJECT_ALGORITHM_PARAMETER_LIST

PROJECT_ALGORITHM_PARAMETER_LIST

📁 0

0

ParameterName

object

ParameterType

any|Object
📁 ParameterExampleList

ParameterExampleList

0

{ "name": "Patrick Morrison", "address": { "city": "Beijing" } }
📁 1

1

ParameterName

propertyKeyNameList

ParameterType

string[]
📁 ParameterExampleList

ParameterExampleList

0

['address', 'city']
📁 PROJECT_ALGORITHM_RETURN_PARAMETER_LIST

PROJECT_ALGORITHM_RETURN_PARAMETER_LIST

📁 0

0

ParameterName

objectPropertyValue

ParameterType

any
📁 ParameterExampleList

ParameterExampleList

0

"Beijing"
📁 PROJECT_ALGORITHM_EXAMPLE_USECASE_LIST

PROJECT_ALGORITHM_EXAMPLE_USECASE_LIST

📁 0

0

ProjectExampleUsecaseTitle

Getting Started: Function call example usecase

ProjectExampleUsecaseSourceCodeTextDescription

getObjectValue.function(object, propertyKeyNameList)
📁 1

1

ProjectExampleUsecaseTitle

Getting Started: Application context example usecase

ProjectExampleTextDescription

// Create a javascript library instance for your project const myProjectObjectUtility = objectUtility.consumer.javascript.algorithms.createJavascriptLibraryInstance.function('my-project-id') // Initialize a javascript object const myObject = { name: 'Claire', favoriteActivitiesTable: { dancing: { activityName: 'Dancing', placesVisitedToPerformActivity: ['New York', 'Los Angelos'], firstMemoryPerformingActivity: { placePerformedActivity: 'New York' } } }} // Retrieve the property value of myObject by using a property key name list const placePerformedActivityDuringFirstMemory = myProjectObjectUtility.usecase.objectUtility.algorithms.getObjectValue.function(myObject, ['favoriteActivitiesTable', 'dancing', 'firstMemoryPerformingActivity', 'placePerformedActivity']) // Print the place where the first memory of the dancing activity occurred as it is one of Claire's favorite activities console.log('The following should be "New York": ', placePerformedActivityDuringFirstMemory)
📁 PROJECT_DOCUMENTATION_INDEX_FILE_CONTENT

PROJECT_DOCUMENTATION_INDEX_FILE_CONTENT

📁 AddObjectToObjectDuplicator

AddObjectToObjectDuplicator

Function

function addObjectToObjectDuplicatorFunction(objectDuplicator, objectDuplicateId) { objectDuplicator.objectDuplicateTable[objectDuplicateId] = _object_create_object_deep_copy__WEBPACK_IMPORTED_MODULE_0__["createObjectDeepCopy"].function(objectDuplicator.object); return objectDuplicator.objectDuplicateTable[objectDuplicateId]; }
📁 CreateObjectDuplicator

CreateObjectDuplicator

PROJECT_DOCUMENTATION_FILE_PATH_DIRECTORY_NAME

precompiled/usecase/object-utility/algorithms/object/create-object-deep-copy

PROJECT_ALGORITHM_NAME

getObjectValue
📁 PROJECT_ALGORITHM_PARAMETER_LIST

PROJECT_ALGORITHM_PARAMETER_LIST

📁 0

0

ParameterName

object

ParameterType

any|Object
📁 ParameterExampleList

ParameterExampleList

0

{ "name": "Patrick Morrison", "address": { "city": "Beijing" } }
📁 1

1

ParameterName

propertyKeyNameList

ParameterType

string[]
📁 ParameterExampleList

ParameterExampleList

0

['address', 'city']
📁 PROJECT_ALGORITHM_RETURN_PARAMETER_LIST

PROJECT_ALGORITHM_RETURN_PARAMETER_LIST

📁 0

0

ParameterName

objectPropertyValue

ParameterType

any
📁 ParameterExampleList

ParameterExampleList

0

"Beijing"
📁 PROJECT_ALGORITHM_EXAMPLE_USECASE_LIST

PROJECT_ALGORITHM_EXAMPLE_USECASE_LIST

📁 0

0

ProjectExampleUsecaseTitle

Getting Started: Function call example usecase

ProjectExampleUsecaseSourceCodeTextDescription

getObjectValue.function(object, propertyKeyNameList)
📁 1

1

ProjectExampleUsecaseTitle

Getting Started: Application context example usecase

ProjectExampleTextDescription

// Create a javascript library instance for your project const myProjectObjectUtility = objectUtility.consumer.javascript.algorithms.createJavascriptLibraryInstance.function('my-project-id') // Initialize a javascript object const myObject = { name: 'Claire', favoriteActivitiesTable: { dancing: { activityName: 'Dancing', placesVisitedToPerformActivity: ['New York', 'Los Angelos'], firstMemoryPerformingActivity: { placePerformedActivity: 'New York' } } }} // Retrieve the property value of myObject by using a property key name list const placePerformedActivityDuringFirstMemory = myProjectObjectUtility.usecase.objectUtility.algorithms.getObjectValue.function(myObject, ['favoriteActivitiesTable', 'dancing', 'firstMemoryPerformingActivity', 'placePerformedActivity']) // Print the place where the first memory of the dancing activity occurred as it is one of Claire's favorite activities console.log('The following should be "New York": ', placePerformedActivityDuringFirstMemory)
📁 PROJECT_DOCUMENTATION_INDEX_FILE_CONTENT

PROJECT_DOCUMENTATION_INDEX_FILE_CONTENT

📁 CreateObjectDuplicator

CreateObjectDuplicator

Function

function createObjectDuplicatorFunction(object) { return new _data_structures_object_duplicator__WEBPACK_IMPORTED_MODULE_0__["ObjectDuplicator"](_object_create_object_deep_copy__WEBPACK_IMPORTED_MODULE_1__["createObjectDeepCopy"].function(object)); }
📁 GetObjectFromObjectDuplicator

GetObjectFromObjectDuplicator

PROJECT_DOCUMENTATION_FILE_PATH_DIRECTORY_NAME

precompiled/usecase/object-utility/algorithms/object/create-object-deep-copy

PROJECT_ALGORITHM_NAME

getObjectValue
📁 PROJECT_ALGORITHM_PARAMETER_LIST

PROJECT_ALGORITHM_PARAMETER_LIST

📁 0

0

ParameterName

object

ParameterType

any|Object
📁 ParameterExampleList

ParameterExampleList

0

{ "name": "Patrick Morrison", "address": { "city": "Beijing" } }
📁 1

1

ParameterName

propertyKeyNameList

ParameterType

string[]
📁 ParameterExampleList

ParameterExampleList

0

['address', 'city']
📁 PROJECT_ALGORITHM_RETURN_PARAMETER_LIST

PROJECT_ALGORITHM_RETURN_PARAMETER_LIST

📁 0

0

ParameterName

objectPropertyValue

ParameterType

any
📁 ParameterExampleList

ParameterExampleList

0

"Beijing"
📁 PROJECT_ALGORITHM_EXAMPLE_USECASE_LIST

PROJECT_ALGORITHM_EXAMPLE_USECASE_LIST

📁 0

0

ProjectExampleUsecaseTitle

Getting Started: Function call example usecase

ProjectExampleUsecaseSourceCodeTextDescription

getObjectValue.function(object, propertyKeyNameList)
📁 1

1

ProjectExampleUsecaseTitle

Getting Started: Application context example usecase

ProjectExampleTextDescription

// Create a javascript library instance for your project const myProjectObjectUtility = objectUtility.consumer.javascript.algorithms.createJavascriptLibraryInstance.function('my-project-id') // Initialize a javascript object const myObject = { name: 'Claire', favoriteActivitiesTable: { dancing: { activityName: 'Dancing', placesVisitedToPerformActivity: ['New York', 'Los Angelos'], firstMemoryPerformingActivity: { placePerformedActivity: 'New York' } } }} // Retrieve the property value of myObject by using a property key name list const placePerformedActivityDuringFirstMemory = myProjectObjectUtility.usecase.objectUtility.algorithms.getObjectValue.function(myObject, ['favoriteActivitiesTable', 'dancing', 'firstMemoryPerformingActivity', 'placePerformedActivity']) // Print the place where the first memory of the dancing activity occurred as it is one of Claire's favorite activities console.log('The following should be "New York": ', placePerformedActivityDuringFirstMemory)
📁 PROJECT_DOCUMENTATION_INDEX_FILE_CONTENT

PROJECT_DOCUMENTATION_INDEX_FILE_CONTENT

📁 GetObjectFromObjectDuplicator

GetObjectFromObjectDuplicator

Function

function getObjectFromObjectDuplicatorFunction(objectDuplicator, objectDuplicateId, option) { let object = objectDuplicator.objectDuplicateTable[objectDuplicateId]; if (object === undefined && option && option.booleanAddObjectIfUndefined) { object = _add_object_to_object_duplicator__WEBPACK_IMPORTED_MODULE_0__["addObjectToObjectDuplicator"].function(objectDuplicator, objectDuplicateId); } return object; }
📁 RemoveObjectFromObjectDuplicator

RemoveObjectFromObjectDuplicator

PROJECT_DOCUMENTATION_FILE_PATH_DIRECTORY_NAME

precompiled/usecase/object-utility/algorithms/object/create-object-deep-copy

PROJECT_ALGORITHM_NAME

getObjectValue
📁 PROJECT_ALGORITHM_PARAMETER_LIST

PROJECT_ALGORITHM_PARAMETER_LIST

📁 0

0

ParameterName

object

ParameterType

any|Object
📁 ParameterExampleList

ParameterExampleList

0

{ "name": "Patrick Morrison", "address": { "city": "Beijing" } }
📁 1

1

ParameterName

propertyKeyNameList

ParameterType

string[]
📁 ParameterExampleList

ParameterExampleList

0

['address', 'city']
📁 PROJECT_ALGORITHM_RETURN_PARAMETER_LIST

PROJECT_ALGORITHM_RETURN_PARAMETER_LIST

📁 0

0

ParameterName

objectPropertyValue

ParameterType

any
📁 ParameterExampleList

ParameterExampleList

0

"Beijing"
📁 PROJECT_ALGORITHM_EXAMPLE_USECASE_LIST

PROJECT_ALGORITHM_EXAMPLE_USECASE_LIST

📁 0

0

ProjectExampleUsecaseTitle

Getting Started: Function call example usecase

ProjectExampleUsecaseSourceCodeTextDescription

getObjectValue.function(object, propertyKeyNameList)
📁 1

1

ProjectExampleUsecaseTitle

Getting Started: Application context example usecase

ProjectExampleTextDescription

// Create a javascript library instance for your project const myProjectObjectUtility = objectUtility.consumer.javascript.algorithms.createJavascriptLibraryInstance.function('my-project-id') // Initialize a javascript object const myObject = { name: 'Claire', favoriteActivitiesTable: { dancing: { activityName: 'Dancing', placesVisitedToPerformActivity: ['New York', 'Los Angelos'], firstMemoryPerformingActivity: { placePerformedActivity: 'New York' } } }} // Retrieve the property value of myObject by using a property key name list const placePerformedActivityDuringFirstMemory = myProjectObjectUtility.usecase.objectUtility.algorithms.getObjectValue.function(myObject, ['favoriteActivitiesTable', 'dancing', 'firstMemoryPerformingActivity', 'placePerformedActivity']) // Print the place where the first memory of the dancing activity occurred as it is one of Claire's favorite activities console.log('The following should be "New York": ', placePerformedActivityDuringFirstMemory)
📁 PROJECT_DOCUMENTATION_INDEX_FILE_CONTENT

PROJECT_DOCUMENTATION_INDEX_FILE_CONTENT

📁 RemoveObjectFromObjectDuplicator

RemoveObjectFromObjectDuplicator

Function

function removeObjectFromObjectDuplicatorFunction(objectDuplicator, objectDuplicateId) { delete objectDuplicator.objectDuplicateTable[objectDuplicateId]; }
📁 DataStructures

DataStructures

📁 ObjectDuplicator

ObjectDuplicator

PROJECT_DOCUMENTATION_FILE_PATH_DIRECTORY_NAME

precompiled/usecase/object-utility/algorithms/object/create-object-deep-copy

PROJECT_ALGORITHM_NAME

getObjectValue
📁 PROJECT_ALGORITHM_PARAMETER_LIST

PROJECT_ALGORITHM_PARAMETER_LIST

📁 0

0

ParameterName

object

ParameterType

any|Object
📁 ParameterExampleList

ParameterExampleList

0

{ "name": "Patrick Morrison", "address": { "city": "Beijing" } }
📁 1

1

ParameterName

propertyKeyNameList

ParameterType

string[]
📁 ParameterExampleList

ParameterExampleList

0

['address', 'city']
📁 PROJECT_ALGORITHM_RETURN_PARAMETER_LIST

PROJECT_ALGORITHM_RETURN_PARAMETER_LIST

📁 0

0

ParameterName

objectPropertyValue

ParameterType

any
📁 ParameterExampleList

ParameterExampleList

0

"Beijing"
📁 PROJECT_ALGORITHM_EXAMPLE_USECASE_LIST

PROJECT_ALGORITHM_EXAMPLE_USECASE_LIST

📁 0

0

ProjectExampleUsecaseTitle

Getting Started: Function call example usecase

ProjectExampleUsecaseSourceCodeTextDescription

getObjectValue.function(object, propertyKeyNameList)
📁 1

1

ProjectExampleUsecaseTitle

Getting Started: Application context example usecase

ProjectExampleTextDescription

// Create a javascript library instance for your project const myProjectObjectUtility = objectUtility.consumer.javascript.algorithms.createJavascriptLibraryInstance.function('my-project-id') // Initialize a javascript object const myObject = { name: 'Claire', favoriteActivitiesTable: { dancing: { activityName: 'Dancing', placesVisitedToPerformActivity: ['New York', 'Los Angelos'], firstMemoryPerformingActivity: { placePerformedActivity: 'New York' } } }} // Retrieve the property value of myObject by using a property key name list const placePerformedActivityDuringFirstMemory = myProjectObjectUtility.usecase.objectUtility.algorithms.getObjectValue.function(myObject, ['favoriteActivitiesTable', 'dancing', 'firstMemoryPerformingActivity', 'placePerformedActivity']) // Print the place where the first memory of the dancing activity occurred as it is one of Claire's favorite activities console.log('The following should be "New York": ', placePerformedActivityDuringFirstMemory)
📁 PROJECT_DOCUMENTATION_INDEX_FILE_CONTENT

PROJECT_DOCUMENTATION_INDEX_FILE_CONTENT

ObjectDuplicator

class ObjectDuplicator { constructor(object) { this.objectDuplicateTable = {}; this.object = object; } }
📁 MarkdownUtility

MarkdownUtility

📁 Algorithms

Algorithms

📁 CreateMarkdownTableFromJavascriptObject

CreateMarkdownTableFromJavascriptObject

📁 DataStructures

DataStructures

📁 DocumentationInterface

DocumentationInterface

📁 Provider

Provider

Operating Environment: JavaScript Runtime Environments

JavaScript Runtime EnvironmentNode.jsNode.js Worker ThreadWeb WorkerGoogle ChromeMozilla FirefoxApple SafariBeaker Browser
Supported Versions of the RuntimeThe latest version(s)The latest version(s)The latest version(s)The latest version(s)The latest version(s)The latest version(s)The latest version(s)

To Resolve Problems and Submit Feature Requests

To report issues or submit feature requests with this projectConstants, please visit Program Utility Issue Tracker

About This Project

Benefits

Features

Limitations

  • 🤓 Work-in-progress: This project is a work-in-progress. The project architecture and documentation are being updated regularly. Please learn more about the development life cycle by visiting our live programming development sessions on youtube: https://www.youtube.com/channel/UCIv-rMXljsbxoTUg1MXBi3g

There are many projects relating to the application usecases that Program Utility strives to provide. A "project usecase 1", a "project usecase 2", a "project usecase 3" are the primary goal for Program Utility. This is a non-exhaustive list of other projects in the world that are being used and also relate to Program Utility usecase areas-of-interest (well renowned projects are prioritized in our listing order strategy):

Object Utility Providers
--

Acknowledgements

License

MIT

Keywords

FAQs

Package last updated on 10 Jun 2020

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