Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 29, 2025

The getProperty function is exported from the main package but was undocumented in the README.

Changes

  • Added API documentation section for getProperty with parameter types and return values
  • Documented path syntax from most to least common:
    • Simple property access: "name", "age"
    • Nested properties: "user.name"
    • Array indices: "items.0"
    • Parent/grandparent context: "..parentProp", "../../grandProp"
  • Added code examples demonstrating typical usage patterns

Example

import { getProperty } from 'treebark';

const data = {
  name: 'Alice',
  user: { profile: { email: '[email protected]' } }
};

getProperty(data, 'name');              // 'Alice'
getProperty(data, 'user.profile.email'); // '[email protected]'
getProperty(data, 'missing', [], undefined, 
  (path) => `default-${path}`);         // 'default-missing'
Original prompt

document the getProperty export in nodejs/packages/treebark readme


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Document getProperty export in Treebark README Document getProperty export in treebark package README Oct 29, 2025
Copilot AI requested a review from danmarshall October 29, 2025 21:21
Copilot finished work on behalf of danmarshall October 29, 2025 21:21
Removed example code snippets for getProperty function from README.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants