Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mjumbewu opened this issue Dec 11, 2023 · 0 comments
Open

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

mjumbewu opened this issue Dec 11, 2023 · 0 comments

Comments

@mjumbewu
Copy link

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/[email protected]/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,
};
};
}

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

No branches or pull requests

1 participant