From 4a9c70e333768db87baa11bd349ca75dea99e698 Mon Sep 17 00:00:00 2001 From: Vincent Privat Date: Fri, 7 Nov 2025 10:18:54 +0100 Subject: [PATCH] Fix typos --- README.md | 10 +++++----- fields.json | 4 ++-- formatters.js | 4 ++-- interface.js | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 7f7fddc..613b883 100644 --- a/README.md +++ b/README.md @@ -85,9 +85,9 @@ The following options are available in the object: * `custom`: A structure that can't easily be rendered with any of the pre-defined formatters and thus needs a custom implementation (see `externalRenderer`). * `alias`: If a field has multiple keys, declare the field to use the specification of the other field. * `listWithKeys`: Set to `true` to allow the option `items` to specify items in an object of objects (like assets). Defaults to `false`. -* `items`: If the value is an array of objects (or an object of objects if `listWithKeys` has ben set), a table can be created with the details in this object. It has the same structure as specified here, but in additon `sortable` and `id` are allowed: - * `sortable`: Specfiies whether the value can be sorted (`true`, e.g. in a table) or not (`false`). Defaults to `false`. - * `id`: Specfiies whether the value is the unique primary key (`true`) or not (`false`). Defaults to `false`. +* `items`: If the value is an array of objects (or an object of objects if `listWithKeys` has ben set), a table can be created with the details in this object. It has the same structure as specified here, but in addition `sortable` and `id` are allowed: + * `sortable`: Specifies whether the value can be sorted (`true`, e.g. in a table) or not (`false`). Defaults to `false`. + * `id`: Specifies whether the value is the unique primary key (`true`) or not (`false`). Defaults to `false`. * `default`: If no value is present, this value will be used instead. * `properties`: If the value is an object, specify the properties. * `null`: The value that should be given instead of `null`. If a value is null but this property is not given, defaults to "n/a". @@ -150,7 +150,7 @@ The most important methods are: * Shape (formats an array containing shape/size information, e.g. `proj:shape`) * Software (formats the list of software as defined in the processing extension) * TemporalExtent (array with two timestamps formatted as temporal range, see Timestamp) - add `shorten: true` to the field spec to render a shorter version (i.e. date only) -* TemporalExtents (array containing a temporal extent per element, which is rendere using `TemporalExtent`, see above) +* TemporalExtents (array containing a temporal extent per element, which is rendered using `TemporalExtent`, see above) * Transform (makes 2D numerical arrays, e.g. the `proj:transform` field, better readable) * Timestamp (ISO8601 timestamp formatted according to local rules) * Url (Formats a STAC Link Object) @@ -171,7 +171,7 @@ Formatters are always functions that have the following signature: The returned value is always expected to be a string. It may contain HTML if the formatter is added to the `htmlFormats` array in `fields.json`. -If the return value is allowed to contain HTML, ALL user input must run thorugh the `e()` function (or `parseInt` for integers, for example) to escape malicious HTML tags. +If the return value is allowed to contain HTML, ALL user input must run through the `e()` function (or `parseInt` for integers, for example) to escape malicious HTML tags. This avoids XSS and similar security issues. ### `I18N` diff --git a/fields.json b/fields.json index d46f71c..bb84435 100644 --- a/fields.json +++ b/fields.json @@ -370,7 +370,7 @@ "mean": "Average", "maximum": { "label": "Max.", - "explain": "Maxmimum value" + "explain": "Maximum value" }, "minimum": { "label": "Min.", @@ -1274,7 +1274,7 @@ "count": "Count", "maximum": { "label": "Max.", - "explain": "Maxmimum value" + "explain": "Maximum value" }, "minimum": { "label": "Min.", diff --git a/formatters.js b/formatters.js index afb8c4f..933078b 100644 --- a/formatters.js +++ b/formatters.js @@ -130,7 +130,7 @@ const Formatters = { return short ? 'COPC' : 'Cloud-Optimized Point Cloud (LASzip)'; case 'application/vnd+zarr': // https://github.com/zarr-developers/zarr-specs/issues/123 return 'Zarr'; - case 'application/x-parquet': // Inofficial + case 'application/x-parquet': // Unofficial case 'application/vnd.apache.parquet': // Official (tbc): https://github.com/opengeospatial/geoparquet/issues/115 return 'Parquet' case 'application/vnd.pmtiles': @@ -138,7 +138,7 @@ const Formatters = { case 'application/vnd.cov+json': return 'CoverageJSON'; case 'application/vnd.flatgeobuf': - return 'FlatGeobuf'; // inofficial: https://github.com/flatgeobuf/flatgeobuf/discussions/112 + return 'FlatGeobuf'; // unofficial: https://github.com/flatgeobuf/flatgeobuf/discussions/112 case 'application/x-filegdb': return short ? 'Geodatabase' : 'Esri File Geodatabase'; case 'application/vnd.nitf': diff --git a/interface.js b/interface.js index e9db98e..882dd5f 100644 --- a/interface.js +++ b/interface.js @@ -105,7 +105,7 @@ function formatGrouped(context, data, type, filter, coreKey) { // Go through each field's summary for(let i in formatted) { let result = _.isObject(formatted[i]) ? {} : []; - // Go through each entry in a field's summary (this is besically a single value as defined in the Item spec) + // Go through each entry in a field's summary (this is basically a single value as defined in the Item spec) for(let key in items) { result[key] = format(formatted[i][key], key, context, data, items[key]); }