max-mapper / max-mapper/geojson-js-utils

Arguments validation

Open
#40 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
402
Forks
54
PR merge metrics
No merged PRs in 30d

Description

It'll be great if arguments of utils are validated, it will allow to have more meaningful errors e.g. instead of "Cannot read property '1' of undefined", util will crash with "Point object expected, received null"

@maxogden I will be happy to contribute such validation to the project (by introducing side ensurePoint etc. utils, and then making use of it in API).

Let me know what you think

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the existing GeoJSON utility API and identify the argument handling for point-related functions. Add validation helpers such as ensurePoint where appropriate, use them across the API, and confirm invalid arguments produce meaningful errors instead of runtime property-access failures.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
data
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.