function featureOf(feature, type, name) {
    if (!feature) {
        throw new Error("No feature passed");
    }
    if (!name) {
        throw new Error(".featureOf() requires a name");
    }
    if (!feature || feature.type !== "Feature" || !feature.geometry) {
        throw new Error("Invalid input to " + name + ", Feature with geometry required");
    }
    if (!feature.geometry || feature.geometry.type !== type) {
        throw new Error("Invalid input to " +
            name +
            ": must be a " +
            type +
            ", given " +
            feature.geometry.type);
    }
}
Enforce expectations about types of {@link Feature} inputs for Turf.
Internally this uses {@link geojsonType} to judge geometry types.

@name featureOf
@param {Feature} feature a feature with an expected geometry type
@param {string} type expected GeoJSON type
@param {string} name name of calling function
@throws {Error} error if value is not the expected type.