benjamn / benjamn/ast-types

Make `Path` more consistent with `Array` for array types.

Open
#59 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
1.2k
Forks
194
Avg merge
22h 43m
Merged PRs (30d)
10

Description

If a `Path` object is an array type, it should probably act more like the built-in `Array` class.
Here's what I'm thinking:
- Rename `each` to `forEach`
- Add a `length` property
- Add some/all of the `Array` methods, such as: `concat`, `every`, `find`, `reduce`, `reverse`, `slice`, `some`, `sort`, `splice`.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the Path implementation and the handling for array-type Path objects. Compare the requested behavior with the built-in Array API and determine which methods are in scope; done means the agreed Array-like interface is implemented and covered by the relevant tests, though no test files are named in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.