geojson.js
function checkCRS(crs) {
    if (crs.type === 'name') {
        if (crs.properties && crs.properties.name) {
            return true;
        } else {
            throw new Error('Invalid CRS. Properties must contain "name" key');
        }
    } else if (crs.type === 'link') {
        if (crs.properties && crs.properties.href && crs.properties.type) {
            return true;
        } else {
            throw new Error('Invalid CRS. Properties must contain "href" and "type" key');
        }
    } else {
        throw new Error('Invald CRS. Type attribute must be "name" or "link"');
    }
  }
function checkCRS(crs) {
    if (crs.type === 'name') {
        if (crs.properties && crs.properties.name) {
            return true;
        } else {
            throw new Error('Invalid CRS. Properties must contain "name" key');
        }
    } else if (crs.type === 'link') {
        if (crs.properties && crs.properties.href && crs.properties.type) {
            return true;
        } else {
            throw new Error('Invalid CRS. Properties must contain "href" and "type" key');
        }
    } else {
        throw new Error('Invald CRS. Type attribute must be "name" or "link"');
    }
  }
function checkCRS ( crs ) { if ( crs . type === 'name' ) { if ( crs . properties && crs . properties . name ) { return true ; } else { throw new Error ( 'Invalid CRS. Properties must contain "name" key' ) ; } } else if ( crs . type === 'link' ) { if ( crs . properties && crs . properties . href && crs . properties . type ) { return true ; } else { throw new Error ( 'Invalid CRS. Properties must contain "href" and "type" key' ) ; } } else { throw new Error ( 'Invald CRS. Type attribute must be "name" or "link"' ) ; } }
Verify that the structure of CRS object is valid
Verify that the structure of CRS object is valid