Socket
Socket
Sign inDemoInstall

@turf/clone

Package Overview
Dependencies
Maintainers
4
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@turf/clone - npm Package Compare versions

Comparing version 4.7.3 to 5.0.0

8

index.d.ts

@@ -1,10 +0,6 @@

/// <reference types="geojson" />
import { AllGeoJSON } from '@turf/helpers';
type Types = GeoJSON.FeatureCollection<any> | GeoJSON.Feature<any> | GeoJSON.GeometryObject | GeoJSON.GeometryCollection;
/**
* http://turfjs.org/docs/#clone
*/
declare function clone<T extends Types>(geojson: T): T;
declare namespace clone { }
export = clone;
export default function <T extends AllGeoJSON>(geojson: T): T;

@@ -13,3 +13,3 @@ /**

*/
module.exports = function (geojson) {
function clone(geojson) {
if (!geojson) throw new Error('geojson is required');

@@ -33,3 +33,3 @@

}
};
}

@@ -147,1 +147,3 @@ /**

}
export default clone;
{
"name": "@turf/clone",
"version": "4.7.3",
"version": "5.0.0",
"description": "turf clone module",
"main": "index.js",
"main": "main",
"module": "index",
"jsnext:main": "index",
"types": "index.d.ts",
"files": [
"index.js",
"index.d.ts"
"index.d.ts",
"main.js"
],
"scripts": {
"test": "node test.js",
"bench": "node bench.js"
"pretest": "rollup -c ../../rollup.config.js",
"test": "node -r @std/esm test.js",
"bench": "node -r @std/esm bench.js"
},

@@ -33,7 +37,14 @@ "repository": {

"devDependencies": {
"@turf/helpers": "^4.7.3",
"@turf/meta": "^4.7.3",
"benchmark": "2.1.4",
"tape": "4.7.0"
"@turf/helpers": "*",
"@turf/meta": "*",
"benchmark": "*",
"tape": "*",
"rollup": "*",
"@std/esm": "*"
},
"dependencies": {},
"@std/esm": {
"esm": "js",
"cjs": true
}
}
# @turf/clone
# clone
<!-- Generated by documentation.js. Update this documentation by updating the source code. -->
## clone
Returns a cloned copy of the passed GeoJSON Object, including possible 'Foreign Members'.

@@ -6,0 +8,0 @@ ~3-5x faster than the common JSON.parse + JSON.stringify combo method.

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc