Skip to content

Version of shpwrite.js on unpkg is out of date #118

@mjumbewu

Description

@mjumbewu

The version of shpwrite.js on unpkg is out of date.

For example, https://unpkg.com/@mapbox/shp-write@latest/shpwrite.js (which, at time of writing, redirects to version 0.4.3 at https://unpkg.com/@mapbox/shp-write@0.4.3/shpwrite.js) does not contain the latest code. If you search there for the justType function it reads as:

function justType(type, TYPE) {
  return function (gj) {
    var oftype = gj.features.filter(isType(type));
    return {
      geometries: oftype.map(justCoords),
      properties: oftype.map(justProps),
      type: TYPE,
    };
  };
}

As opposed to what's in geojson.js for version 0.4.3:

shp-write/src/geojson.js

Lines 13 to 22 in 48a0fe7

function justType(gjType, shpType) {
return function (gj) {
var oftype = gj.features.filter(isType(gjType));
return {
geometries: shpType === 'POLYLINE' ? [oftype.map(justCoords)] : oftype.map(justCoords),
properties: oftype.map(justProps),
type: shpType,
};
};
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions