add immoweb ui
This commit is contained in:
parent
7e8c79d3d1
commit
151da16c27
266 changed files with 264879 additions and 0 deletions
20
immoweb/node_modules/@turf/invariant/LICENSE
generated
vendored
Normal file
20
immoweb/node_modules/@turf/invariant/LICENSE
generated
vendored
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2017 TurfJS
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
87
immoweb/node_modules/@turf/invariant/README.md
generated
vendored
Normal file
87
immoweb/node_modules/@turf/invariant/README.md
generated
vendored
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
# @turf/invariant
|
||||
|
||||
# getCoord
|
||||
|
||||
Unwrap a coordinate from a Point Feature, Geometry or a single coordinate.
|
||||
|
||||
**Parameters**
|
||||
|
||||
- `obj` **([Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)<any> | [Geometry](http://geojson.org/geojson-spec.html#geometry) \| [Feature](http://geojson.org/geojson-spec.html#feature-objects)<[Point](http://geojson.org/geojson-spec.html#point)>)** any value
|
||||
|
||||
Returns **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)<[number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)>** coordinates
|
||||
|
||||
# getCoords
|
||||
|
||||
Unwrap coordinates from a Feature, Geometry Object or an Array of numbers
|
||||
|
||||
**Parameters**
|
||||
|
||||
- `obj` **([Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)<any> | [Geometry](http://geojson.org/geojson-spec.html#geometry) \| [Feature](http://geojson.org/geojson-spec.html#feature-objects)<any>)** any value
|
||||
|
||||
Returns **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)<any>** coordinates
|
||||
|
||||
# geojsonType
|
||||
|
||||
Enforce expectations about types of GeoJSON objects for Turf.
|
||||
|
||||
**Parameters**
|
||||
|
||||
- `value` **GeoJSON** any GeoJSON object
|
||||
- `type` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** expected GeoJSON type
|
||||
- `name` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** name of calling function
|
||||
|
||||
|
||||
- Throws **[Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error)** if value is not the expected type.
|
||||
|
||||
# featureOf
|
||||
|
||||
Enforce expectations about types of [Feature](http://geojson.org/geojson-spec.html#feature-objects) inputs for Turf.
|
||||
Internally this uses [geojsonType](#geojsontype) to judge geometry types.
|
||||
|
||||
**Parameters**
|
||||
|
||||
- `feature` **[Feature](http://geojson.org/geojson-spec.html#feature-objects)** a feature with an expected geometry type
|
||||
- `type` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** expected GeoJSON type
|
||||
- `name` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** name of calling function
|
||||
|
||||
|
||||
- Throws **[Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error)** error if value is not the expected type.
|
||||
|
||||
# collectionOf
|
||||
|
||||
Enforce expectations about types of [FeatureCollection](http://geojson.org/geojson-spec.html#feature-collection-objects) inputs for Turf.
|
||||
Internally this uses [geojsonType](#geojsontype) to judge geometry types.
|
||||
|
||||
**Parameters**
|
||||
|
||||
- `featureCollection` **[FeatureCollection](http://geojson.org/geojson-spec.html#feature-collection-objects)** a FeatureCollection for which features will be judged
|
||||
- `type` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** expected GeoJSON type
|
||||
- `name` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** name of calling function
|
||||
|
||||
|
||||
- Throws **[Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error)** if value is not the expected type.
|
||||
|
||||
<!-- This file is automatically generated. Please don't edit it directly:
|
||||
if you find an error, edit the source file (likely index.js), and re-run
|
||||
./scripts/generate-readmes in the turf project. -->
|
||||
|
||||
---
|
||||
|
||||
This module is part of the [Turfjs project](http://turfjs.org/), an open source
|
||||
module collection dedicated to geographic algorithms. It is maintained in the
|
||||
[Turfjs/turf](https://github.com/Turfjs/turf) repository, where you can create
|
||||
PRs and issues.
|
||||
|
||||
### Installation
|
||||
|
||||
Install this module individually:
|
||||
|
||||
```sh
|
||||
$ npm install @turf/invariant
|
||||
```
|
||||
|
||||
Or install the Turf module that includes it as a function:
|
||||
|
||||
```sh
|
||||
$ npm install @turf/turf
|
||||
```
|
||||
30
immoweb/node_modules/@turf/invariant/index.d.ts
generated
vendored
Normal file
30
immoweb/node_modules/@turf/invariant/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
/// <reference types="geojson" />
|
||||
|
||||
type Feature = GeoJSON.Feature<any>
|
||||
type Features = GeoJSON.FeatureCollection<any>
|
||||
type GetCoord = Feature | any[] | GeoJSON.GeometryObject
|
||||
|
||||
/**
|
||||
* http://turfjs.org/docs/
|
||||
*/
|
||||
export function getCoord(obj: GetCoord): Array<any>;
|
||||
|
||||
/**
|
||||
* http://turfjs.org/docs/
|
||||
*/
|
||||
export function getCoords(obj: GetCoord): Array<any>;
|
||||
|
||||
/**
|
||||
* http://turfjs.org/docs/
|
||||
*/
|
||||
export function geojsonType(value: Features, type: string, name: string): void;
|
||||
|
||||
/**
|
||||
* http://turfjs.org/docs/
|
||||
*/
|
||||
export function featureOf(feature: Feature, type: string, name: string): void
|
||||
|
||||
/**
|
||||
* http://turfjs.org/docs/
|
||||
*/
|
||||
export function collectionOf(featurecollection: Features, type: string, name: string): void
|
||||
140
immoweb/node_modules/@turf/invariant/index.js
generated
vendored
Normal file
140
immoweb/node_modules/@turf/invariant/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,140 @@
|
|||
/**
|
||||
* Unwrap a coordinate from a Point Feature, Geometry or a single coordinate.
|
||||
*
|
||||
* @param {Array<any>|Geometry|Feature<Point>} obj any value
|
||||
* @returns {Array<number>} coordinates
|
||||
*/
|
||||
function getCoord(obj) {
|
||||
if (!obj) throw new Error('No obj passed');
|
||||
|
||||
var coordinates = getCoords(obj);
|
||||
|
||||
// getCoord() must contain at least two numbers (Point)
|
||||
if (coordinates.length > 1 &&
|
||||
typeof coordinates[0] === 'number' &&
|
||||
typeof coordinates[1] === 'number') {
|
||||
return coordinates;
|
||||
} else {
|
||||
throw new Error('Coordinate is not a valid Point');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unwrap coordinates from a Feature, Geometry Object or an Array of numbers
|
||||
*
|
||||
* @param {Array<any>|Geometry|Feature<any>} obj any value
|
||||
* @returns {Array<any>} coordinates
|
||||
*/
|
||||
function getCoords(obj) {
|
||||
if (!obj) throw new Error('No obj passed');
|
||||
var coordinates;
|
||||
|
||||
// Array of numbers
|
||||
if (obj.length) {
|
||||
coordinates = obj;
|
||||
|
||||
// Geometry Object
|
||||
} else if (obj.coordinates) {
|
||||
coordinates = obj.coordinates;
|
||||
|
||||
// Feature
|
||||
} else if (obj.geometry && obj.geometry.coordinates) {
|
||||
coordinates = obj.geometry.coordinates;
|
||||
}
|
||||
// Checks if coordinates contains a number
|
||||
if (coordinates) {
|
||||
containsNumber(coordinates);
|
||||
return coordinates;
|
||||
}
|
||||
throw new Error('No valid coordinates');
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if coordinates contains a number
|
||||
*
|
||||
* @private
|
||||
* @param {Array<any>} coordinates GeoJSON Coordinates
|
||||
* @returns {boolean} true if Array contains a number
|
||||
*/
|
||||
function containsNumber(coordinates) {
|
||||
if (coordinates.length > 1 &&
|
||||
typeof coordinates[0] === 'number' &&
|
||||
typeof coordinates[1] === 'number') {
|
||||
return true;
|
||||
}
|
||||
if (coordinates[0].length) {
|
||||
return containsNumber(coordinates[0]);
|
||||
}
|
||||
throw new Error('coordinates must only contain numbers');
|
||||
}
|
||||
|
||||
/**
|
||||
* Enforce expectations about types of GeoJSON objects for Turf.
|
||||
*
|
||||
* @alias geojsonType
|
||||
* @param {GeoJSON} value any GeoJSON object
|
||||
* @param {string} type expected GeoJSON type
|
||||
* @param {string} name name of calling function
|
||||
* @throws {Error} if value is not the expected type.
|
||||
*/
|
||||
function geojsonType(value, type, name) {
|
||||
if (!type || !name) throw new Error('type and name required');
|
||||
|
||||
if (!value || value.type !== type) {
|
||||
throw new Error('Invalid input to ' + name + ': must be a ' + type + ', given ' + value.type);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Enforce expectations about types of {@link Feature} inputs for Turf.
|
||||
* Internally this uses {@link geojsonType} to judge geometry types.
|
||||
*
|
||||
* @alias 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.
|
||||
*/
|
||||
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 FeatureCollection} inputs for Turf.
|
||||
* Internally this uses {@link geojsonType} to judge geometry types.
|
||||
*
|
||||
* @alias collectionOf
|
||||
* @param {FeatureCollection} featureCollection a FeatureCollection for which features will be judged
|
||||
* @param {string} type expected GeoJSON type
|
||||
* @param {string} name name of calling function
|
||||
* @throws {Error} if value is not the expected type.
|
||||
*/
|
||||
function collectionOf(featureCollection, type, name) {
|
||||
if (!featureCollection) throw new Error('No featureCollection passed');
|
||||
if (!name) throw new Error('.collectionOf() requires a name');
|
||||
if (!featureCollection || featureCollection.type !== 'FeatureCollection') {
|
||||
throw new Error('Invalid input to ' + name + ', FeatureCollection required');
|
||||
}
|
||||
for (var i = 0; i < featureCollection.features.length; i++) {
|
||||
var feature = featureCollection.features[i];
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports.geojsonType = geojsonType;
|
||||
module.exports.collectionOf = collectionOf;
|
||||
module.exports.featureOf = featureOf;
|
||||
module.exports.getCoord = getCoord;
|
||||
module.exports.getCoords = getCoords;
|
||||
65
immoweb/node_modules/@turf/invariant/package.json
generated
vendored
Normal file
65
immoweb/node_modules/@turf/invariant/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
{
|
||||
"_from": "@turf/invariant@^3.13.0",
|
||||
"_id": "@turf/invariant@3.13.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-iSQzCM1WMgboHlxhYuDSL2GCL5A=",
|
||||
"_location": "/@turf/invariant",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "@turf/invariant@^3.13.0",
|
||||
"name": "@turf/invariant",
|
||||
"escapedName": "@turf%2finvariant",
|
||||
"scope": "@turf",
|
||||
"rawSpec": "^3.13.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^3.13.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/@turf/destination",
|
||||
"/@turf/distance"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/@turf/invariant/-/invariant-3.13.0.tgz",
|
||||
"_shasum": "89243308cd563206e81e5c6162e0d22f61822f90",
|
||||
"_spec": "@turf/invariant@^3.13.0",
|
||||
"_where": "/home/kadir/workspace/webimmo/node_modules/@turf/destination",
|
||||
"author": {
|
||||
"name": "Turf Authors"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/Turfjs/turf/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {},
|
||||
"deprecated": false,
|
||||
"description": "turf invariant module",
|
||||
"devDependencies": {
|
||||
"@turf/helpers": "^3.13.0",
|
||||
"benchmark": "^2.1.3",
|
||||
"tape": "^3.5.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts"
|
||||
],
|
||||
"homepage": "https://github.com/Turfjs/turf",
|
||||
"keywords": [
|
||||
"turf",
|
||||
"invariant",
|
||||
"expectations"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"name": "@turf/invariant",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/Turfjs/turf.git"
|
||||
},
|
||||
"scripts": {
|
||||
"bench": "node bench.js",
|
||||
"test": "node test.js"
|
||||
},
|
||||
"types": "index.d.ts",
|
||||
"version": "3.13.0"
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue