@epilot360/icons 0.0.2 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -5
- package/dist/bundle.js +1 -1
- package/dist/bundle.js.map +1 -1
- package/index.js.map +1 -1
- package/package.json +41 -8
- package/react/Account/index.d.ts +4 -0
- package/react/Account/index.js +41 -0
- package/react/Account/index.js.map +1 -0
- package/react/Add/index.d.ts +4 -0
- package/react/Add/index.js +41 -0
- package/react/Add/index.js.map +1 -0
- package/react/AddCircle/index.d.ts +4 -0
- package/react/AddCircle/index.js +41 -0
- package/react/AddCircle/index.js.map +1 -0
- package/react/Browse/index.d.ts +4 -0
- package/react/Browse/index.js +27 -0
- package/react/Browse/index.js.map +1 -0
- package/react/Calendar/index.d.ts +4 -0
- package/react/Calendar/index.js +41 -0
- package/react/Calendar/index.js.map +1 -0
- package/react/Cancel/index.d.ts +4 -0
- package/react/Cancel/index.js +41 -0
- package/react/Cancel/index.js.map +1 -0
- package/react/Check/index.d.ts +4 -0
- package/react/Check/index.js +41 -0
- package/react/Check/index.js.map +1 -0
- package/react/CheckCircle/index.d.ts +4 -0
- package/react/CheckCircle/index.js +41 -0
- package/react/CheckCircle/index.js.map +1 -0
- package/react/Close/index.d.ts +4 -0
- package/react/Close/index.js +41 -0
- package/react/Close/index.js.map +1 -0
- package/react/Compass/index.d.ts +4 -0
- package/react/Compass/index.js +27 -0
- package/react/Compass/index.js.map +1 -0
- package/react/Contact/index.d.ts +4 -0
- package/react/Contact/index.js +41 -0
- package/react/Contact/index.js.map +1 -0
- package/react/ContentCopy/index.d.ts +4 -0
- package/react/ContentCopy/index.js +41 -0
- package/react/ContentCopy/index.js.map +1 -0
- package/react/Contract/index.d.ts +4 -0
- package/react/Contract/index.js +41 -0
- package/react/Contract/index.js.map +1 -0
- package/react/Dashboard/index.d.ts +4 -0
- package/react/Dashboard/index.js +41 -0
- package/react/Dashboard/index.js.map +1 -0
- package/react/DataObject/index.d.ts +4 -0
- package/react/DataObject/index.js +41 -0
- package/react/DataObject/index.js.map +1 -0
- package/react/Delete/index.d.ts +4 -0
- package/react/Delete/index.js +41 -0
- package/react/Delete/index.js.map +1 -0
- package/react/Design/index.d.ts +4 -0
- package/react/Design/index.js +41 -0
- package/react/Design/index.js.map +1 -0
- package/react/Document/index.d.ts +4 -0
- package/react/Document/index.js +41 -0
- package/react/Document/index.js.map +1 -0
- package/react/Draft/index.d.ts +4 -0
- package/react/Draft/index.js +41 -0
- package/react/Draft/index.js.map +1 -0
- package/react/DragIndicator/index.d.ts +4 -0
- package/react/DragIndicator/index.js +41 -0
- package/react/DragIndicator/index.js.map +1 -0
- package/react/Edit/index.d.ts +4 -0
- package/react/Edit/index.js +41 -0
- package/react/Edit/index.js.map +1 -0
- package/react/Entity/index.d.ts +4 -0
- package/react/Entity/index.js +41 -0
- package/react/Entity/index.js.map +1 -0
- package/react/Epilot/index.d.ts +4 -0
- package/react/Epilot/index.js +40 -0
- package/react/Epilot/index.js.map +1 -0
- package/react/EpilotIcon.d.ts +110 -0
- package/react/EpilotIcon.js +130 -0
- package/react/EpilotIcon.js.map +1 -0
- package/react/ExpandLess/index.d.ts +4 -0
- package/react/ExpandLess/index.js +41 -0
- package/react/ExpandLess/index.js.map +1 -0
- package/react/ExpandMore/index.d.ts +4 -0
- package/react/ExpandMore/index.js +41 -0
- package/react/ExpandMore/index.js.map +1 -0
- package/react/Explore/index.d.ts +4 -0
- package/react/Explore/index.js +41 -0
- package/react/Explore/index.js.map +1 -0
- package/react/File/index.d.ts +4 -0
- package/react/File/index.js +41 -0
- package/react/File/index.js.map +1 -0
- package/react/Folder/index.d.ts +4 -0
- package/react/Folder/index.js +41 -0
- package/react/Folder/index.js.map +1 -0
- package/react/Help/index.d.ts +4 -0
- package/react/Help/index.js +41 -0
- package/react/Help/index.js.map +1 -0
- package/react/Info/index.d.ts +4 -0
- package/react/Info/index.js +41 -0
- package/react/Info/index.js.map +1 -0
- package/react/Journey/index.d.ts +4 -0
- package/react/Journey/index.js +41 -0
- package/react/Journey/index.js.map +1 -0
- package/react/Mail/index.d.ts +4 -0
- package/react/Mail/index.js +41 -0
- package/react/Mail/index.js.map +1 -0
- package/react/Menu/index.d.ts +4 -0
- package/react/Menu/index.js +41 -0
- package/react/Menu/index.js.map +1 -0
- package/react/Message/index.d.ts +4 -0
- package/react/Message/index.js +41 -0
- package/react/Message/index.js.map +1 -0
- package/react/Meter/index.d.ts +4 -0
- package/react/Meter/index.js +41 -0
- package/react/Meter/index.js.map +1 -0
- package/react/Notifications/index.d.ts +4 -0
- package/react/Notifications/index.js +41 -0
- package/react/Notifications/index.js.map +1 -0
- package/react/OpenInNew/index.d.ts +4 -0
- package/react/OpenInNew/index.js +41 -0
- package/react/OpenInNew/index.js.map +1 -0
- package/react/Opportunity/index.d.ts +4 -0
- package/react/Opportunity/index.js +41 -0
- package/react/Opportunity/index.js.map +1 -0
- package/react/Order/index.d.ts +4 -0
- package/react/Order/index.js +41 -0
- package/react/Order/index.js.map +1 -0
- package/react/Partner/index.d.ts +4 -0
- package/react/Partner/index.js +41 -0
- package/react/Partner/index.js.map +1 -0
- package/react/Price/index.d.ts +4 -0
- package/react/Price/index.js +41 -0
- package/react/Price/index.js.map +1 -0
- package/react/Product/index.d.ts +4 -0
- package/react/Product/index.js +41 -0
- package/react/Product/index.js.map +1 -0
- package/react/Refresh/index.d.ts +4 -0
- package/react/Refresh/index.js +41 -0
- package/react/Refresh/index.js.map +1 -0
- package/react/Search/index.d.ts +4 -0
- package/react/Search/index.js +41 -0
- package/react/Search/index.js.map +1 -0
- package/react/Settings/index.d.ts +4 -0
- package/react/Settings/index.js +41 -0
- package/react/Settings/index.js.map +1 -0
- package/react/Share/index.d.ts +4 -0
- package/react/Share/index.js +41 -0
- package/react/Share/index.js.map +1 -0
- package/react/Submission/index.d.ts +4 -0
- package/react/Submission/index.js +41 -0
- package/react/Submission/index.js.map +1 -0
- package/react/Tax/index.d.ts +4 -0
- package/react/Tax/index.js +41 -0
- package/react/Tax/index.js.map +1 -0
- package/react/Templates/index.d.ts +4 -0
- package/react/Templates/index.js +41 -0
- package/react/Templates/index.js.map +1 -0
- package/react/Visibility/index.d.ts +4 -0
- package/react/Visibility/index.js +41 -0
- package/react/Visibility/index.js.map +1 -0
- package/react/VisibilityOff/index.d.ts +4 -0
- package/react/VisibilityOff/index.js +41 -0
- package/react/VisibilityOff/index.js.map +1 -0
- package/react/Warning/index.d.ts +4 -0
- package/react/Warning/index.js +41 -0
- package/react/Warning/index.js.map +1 -0
- package/react/Webhook/index.d.ts +4 -0
- package/react/Webhook/index.js +41 -0
- package/react/Webhook/index.js.map +1 -0
- package/react/Workflow/index.d.ts +4 -0
- package/react/Workflow/index.js +41 -0
- package/react/Workflow/index.js.map +1 -0
- package/react/index.d.ts +50 -0
- package/react/index.js +50 -0
- package/react/index.js.map +1 -1
- package/react/types.d.ts +8 -0
- package/react/types.js +10 -0
- package/react/types.js.map +1 -0
- package/src/stories/Readme.mdx +53 -0
- package/iac/node_modules/@balena/dockerignore/LICENSE.md +0 -206
- package/iac/node_modules/@balena/dockerignore/README.md +0 -261
- package/iac/node_modules/@cspotcode/source-map-support/LICENSE.md +0 -21
- package/iac/node_modules/@cspotcode/source-map-support/README.md +0 -289
- package/iac/node_modules/@jridgewell/resolve-uri/LICENSE +0 -19
- package/iac/node_modules/@jridgewell/resolve-uri/README.md +0 -40
- package/iac/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs.map +0 -1
- package/iac/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js.map +0 -1
- package/iac/node_modules/@jridgewell/sourcemap-codec/LICENSE +0 -21
- package/iac/node_modules/@jridgewell/sourcemap-codec/README.md +0 -200
- package/iac/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map +0 -1
- package/iac/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js.map +0 -1
- package/iac/node_modules/@jridgewell/trace-mapping/LICENSE +0 -19
- package/iac/node_modules/@jridgewell/trace-mapping/README.md +0 -193
- package/iac/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs.map +0 -1
- package/iac/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js.map +0 -1
- package/iac/node_modules/@tsconfig/node10/LICENSE +0 -21
- package/iac/node_modules/@tsconfig/node10/README.md +0 -40
- package/iac/node_modules/@tsconfig/node12/LICENSE +0 -21
- package/iac/node_modules/@tsconfig/node12/README.md +0 -40
- package/iac/node_modules/@tsconfig/node14/LICENSE +0 -21
- package/iac/node_modules/@tsconfig/node14/README.md +0 -40
- package/iac/node_modules/@tsconfig/node16/LICENSE +0 -21
- package/iac/node_modules/@tsconfig/node16/README.md +0 -40
- package/iac/node_modules/@types/jest/LICENSE +0 -21
- package/iac/node_modules/@types/jest/README.md +0 -17
- package/iac/node_modules/@types/node/LICENSE +0 -21
- package/iac/node_modules/@types/node/README.md +0 -16
- package/iac/node_modules/@types/prettier/LICENSE +0 -21
- package/iac/node_modules/@types/prettier/README.md +0 -16
- package/iac/node_modules/acorn/LICENSE +0 -21
- package/iac/node_modules/acorn/README.md +0 -273
- package/iac/node_modules/acorn-walk/LICENSE +0 -21
- package/iac/node_modules/acorn-walk/README.md +0 -126
- package/iac/node_modules/ansi-regex/license +0 -9
- package/iac/node_modules/ansi-regex/readme.md +0 -78
- package/iac/node_modules/ansi-styles/license +0 -9
- package/iac/node_modules/ansi-styles/readme.md +0 -144
- package/iac/node_modules/arg/LICENSE.md +0 -21
- package/iac/node_modules/arg/README.md +0 -280
- package/iac/node_modules/at-least-node/LICENSE +0 -6
- package/iac/node_modules/at-least-node/README.md +0 -25
- package/iac/node_modules/aws-cdk/LICENSE +0 -201
- package/iac/node_modules/aws-cdk/README.md +0 -742
- package/iac/node_modules/aws-cdk/lib/init-templates/LICENSE +0 -16
- package/iac/node_modules/aws-cdk/lib/init-templates/app/csharp/README.md +0 -14
- package/iac/node_modules/aws-cdk/lib/init-templates/app/fsharp/README.md +0 -18
- package/iac/node_modules/aws-cdk/lib/init-templates/app/go/README.md +0 -12
- package/iac/node_modules/aws-cdk/lib/init-templates/app/java/README.md +0 -18
- package/iac/node_modules/aws-cdk/lib/init-templates/app/javascript/README.md +0 -12
- package/iac/node_modules/aws-cdk/lib/init-templates/app/python/README.template.md +0 -58
- package/iac/node_modules/aws-cdk/lib/init-templates/app/typescript/README.md +0 -14
- package/iac/node_modules/aws-cdk/lib/init-templates/lib/typescript/README.template.md +0 -12
- package/iac/node_modules/aws-cdk/lib/init-templates/sample-app/csharp/README.template.md +0 -19
- package/iac/node_modules/aws-cdk/lib/init-templates/sample-app/fsharp/README.template.md +0 -20
- package/iac/node_modules/aws-cdk/lib/init-templates/sample-app/go/README.md +0 -12
- package/iac/node_modules/aws-cdk/lib/init-templates/sample-app/java/README.template.md +0 -19
- package/iac/node_modules/aws-cdk/lib/init-templates/sample-app/javascript/README.template.md +0 -13
- package/iac/node_modules/aws-cdk/lib/init-templates/sample-app/python/README.template.md +0 -65
- package/iac/node_modules/aws-cdk/lib/init-templates/sample-app/typescript/README.template.md +0 -15
- package/iac/node_modules/aws-cdk/test/integ/cli/README.md +0 -48
- package/iac/node_modules/aws-cdk/test/integ/cli-regression-patches/README.md +0 -54
- package/iac/node_modules/aws-cdk-lib/LICENSE +0 -201
- package/iac/node_modules/aws-cdk-lib/README.md +0 -1119
- package/iac/node_modules/aws-cdk-lib/alexa-ask/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/assertions/README.md +0 -571
- package/iac/node_modules/aws-cdk-lib/assets/README.md +0 -4
- package/iac/node_modules/aws-cdk-lib/aws-accessanalyzer/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-acmpca/README.md +0 -59
- package/iac/node_modules/aws-cdk-lib/aws-amazonmq/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-amplify/README.md +0 -32
- package/iac/node_modules/aws-cdk-lib/aws-amplifyuibuilder/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-apigateway/README.md +0 -1335
- package/iac/node_modules/aws-cdk-lib/aws-apigatewayv2/README.md +0 -32
- package/iac/node_modules/aws-cdk-lib/aws-appconfig/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-appflow/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-appintegrations/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-applicationautoscaling/README.md +0 -246
- package/iac/node_modules/aws-cdk-lib/aws-applicationinsights/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-appmesh/README.md +0 -883
- package/iac/node_modules/aws-cdk-lib/aws-apprunner/README.md +0 -32
- package/iac/node_modules/aws-cdk-lib/aws-appstream/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-appsync/README.md +0 -32
- package/iac/node_modules/aws-cdk-lib/aws-aps/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-athena/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-auditmanager/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-autoscaling/README.md +0 -540
- package/iac/node_modules/aws-cdk-lib/aws-autoscaling-common/README.md +0 -8
- package/iac/node_modules/aws-cdk-lib/aws-autoscaling-hooktargets/README.md +0 -18
- package/iac/node_modules/aws-cdk-lib/aws-autoscalingplans/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-backup/README.md +0 -210
- package/iac/node_modules/aws-cdk-lib/aws-batch/README.md +0 -32
- package/iac/node_modules/aws-cdk-lib/aws-billingconductor/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-budgets/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-cassandra/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-ce/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-certificatemanager/README.md +0 -166
- package/iac/node_modules/aws-cdk-lib/aws-certificatemanager/lambda-packages/dns_validated_certificate_handler/README.md +0 -2
- package/iac/node_modules/aws-cdk-lib/aws-certificatemanager/suffixes/README.txt +0 -8
- package/iac/node_modules/aws-cdk-lib/aws-chatbot/README.md +0 -44
- package/iac/node_modules/aws-cdk-lib/aws-cloud9/README.md +0 -32
- package/iac/node_modules/aws-cdk-lib/aws-cloudformation/README.md +0 -4
- package/iac/node_modules/aws-cdk-lib/aws-cloudfront/README.md +0 -973
- package/iac/node_modules/aws-cdk-lib/aws-cloudfront-origins/README.md +0 -126
- package/iac/node_modules/aws-cdk-lib/aws-cloudtrail/README.md +0 -189
- package/iac/node_modules/aws-cdk-lib/aws-cloudwatch/README.md +0 -579
- package/iac/node_modules/aws-cdk-lib/aws-cloudwatch-actions/README.md +0 -43
- package/iac/node_modules/aws-cdk-lib/aws-codeartifact/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-codebuild/README.md +0 -759
- package/iac/node_modules/aws-cdk-lib/aws-codecommit/README.md +0 -85
- package/iac/node_modules/aws-cdk-lib/aws-codedeploy/README.md +0 -319
- package/iac/node_modules/aws-cdk-lib/aws-codeguruprofiler/README.md +0 -37
- package/iac/node_modules/aws-cdk-lib/aws-codegurureviewer/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-codepipeline/README.md +0 -481
- package/iac/node_modules/aws-cdk-lib/aws-codepipeline-actions/README.md +0 -1203
- package/iac/node_modules/aws-cdk-lib/aws-codestar/README.md +0 -32
- package/iac/node_modules/aws-cdk-lib/aws-codestarconnections/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-codestarnotifications/README.md +0 -68
- package/iac/node_modules/aws-cdk-lib/aws-cognito/README.md +0 -843
- package/iac/node_modules/aws-cdk-lib/aws-config/README.md +0 -218
- package/iac/node_modules/aws-cdk-lib/aws-connect/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-controltower/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-cur/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-customerprofiles/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-databrew/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-datapipeline/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-datasync/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-dax/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-detective/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-devopsguru/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-directoryservice/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-dlm/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-dms/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-docdb/README.md +0 -153
- package/iac/node_modules/aws-cdk-lib/aws-dynamodb/README.md +0 -200
- package/iac/node_modules/aws-cdk-lib/aws-ec2/README.md +0 -1514
- package/iac/node_modules/aws-cdk-lib/aws-ecr/README.md +0 -110
- package/iac/node_modules/aws-cdk-lib/aws-ecr-assets/README.md +0 -167
- package/iac/node_modules/aws-cdk-lib/aws-ecs/README.md +0 -1225
- package/iac/node_modules/aws-cdk-lib/aws-ecs-patterns/README.md +0 -980
- package/iac/node_modules/aws-cdk-lib/aws-efs/README.md +0 -154
- package/iac/node_modules/aws-cdk-lib/aws-eks/README.md +0 -1450
- package/iac/node_modules/aws-cdk-lib/aws-elasticache/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-elasticbeanstalk/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-elasticloadbalancing/README.md +0 -40
- package/iac/node_modules/aws-cdk-lib/aws-elasticloadbalancingv2/README.md +0 -569
- package/iac/node_modules/aws-cdk-lib/aws-elasticloadbalancingv2-actions/README.md +0 -68
- package/iac/node_modules/aws-cdk-lib/aws-elasticloadbalancingv2-targets/README.md +0 -4
- package/iac/node_modules/aws-cdk-lib/aws-elasticsearch/README.md +0 -441
- package/iac/node_modules/aws-cdk-lib/aws-emr/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-emrcontainers/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-emrserverless/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-events/README.md +0 -249
- package/iac/node_modules/aws-cdk-lib/aws-events-targets/README.md +0 -339
- package/iac/node_modules/aws-cdk-lib/aws-eventschemas/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-evidently/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-finspace/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-fis/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-fms/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-forecast/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-frauddetector/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-fsx/README.md +0 -200
- package/iac/node_modules/aws-cdk-lib/aws-gamelift/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-globalaccelerator/README.md +0 -182
- package/iac/node_modules/aws-cdk-lib/aws-globalaccelerator-endpoints/README.md +0 -10
- package/iac/node_modules/aws-cdk-lib/aws-glue/README.md +0 -32
- package/iac/node_modules/aws-cdk-lib/aws-greengrass/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-greengrassv2/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-groundstation/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-guardduty/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-healthlake/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-iam/README.md +0 -509
- package/iac/node_modules/aws-cdk-lib/aws-imagebuilder/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-inspector/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-inspectorv2/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-iot/README.md +0 -32
- package/iac/node_modules/aws-cdk-lib/aws-iot1click/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-iotanalytics/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-iotcoredeviceadvisor/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-iotevents/README.md +0 -32
- package/iac/node_modules/aws-cdk-lib/aws-iotfleethub/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-iotsitewise/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-iotthingsgraph/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-iottwinmaker/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-iotwireless/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-ivs/README.md +0 -32
- package/iac/node_modules/aws-cdk-lib/aws-kafkaconnect/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-kendra/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-kinesis/README.md +0 -188
- package/iac/node_modules/aws-cdk-lib/aws-kinesisanalytics/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-kinesisanalyticsv2/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-kinesisfirehose/README.md +0 -32
- package/iac/node_modules/aws-cdk-lib/aws-kinesisvideo/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-kms/README.md +0 -209
- package/iac/node_modules/aws-cdk-lib/aws-lakeformation/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-lambda/README.md +0 -985
- package/iac/node_modules/aws-cdk-lib/aws-lambda-destinations/README.md +0 -147
- package/iac/node_modules/aws-cdk-lib/aws-lambda-event-sources/README.md +0 -281
- package/iac/node_modules/aws-cdk-lib/aws-lambda-nodejs/README.md +0 -317
- package/iac/node_modules/aws-cdk-lib/aws-lex/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-licensemanager/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-lightsail/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-location/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-logs/README.md +0 -322
- package/iac/node_modules/aws-cdk-lib/aws-logs-destinations/README.md +0 -7
- package/iac/node_modules/aws-cdk-lib/aws-lookoutequipment/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-lookoutmetrics/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-lookoutvision/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-m2/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-macie/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-managedblockchain/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-mediaconnect/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-mediaconvert/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-medialive/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-mediapackage/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-mediastore/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-mediatailor/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-memorydb/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-msk/README.md +0 -32
- package/iac/node_modules/aws-cdk-lib/aws-mwaa/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-neptune/README.md +0 -32
- package/iac/node_modules/aws-cdk-lib/aws-networkfirewall/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-networkmanager/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-nimblestudio/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-opensearchservice/README.md +0 -378
- package/iac/node_modules/aws-cdk-lib/aws-opsworks/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-opsworkscm/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-panorama/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-personalize/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-pinpoint/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-pinpointemail/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-qldb/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-quicksight/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-ram/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-rds/README.md +0 -704
- package/iac/node_modules/aws-cdk-lib/aws-redshift/README.md +0 -32
- package/iac/node_modules/aws-cdk-lib/aws-redshiftserverless/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-refactorspaces/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-rekognition/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-resiliencehub/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-resourcegroups/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-robomaker/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-route53/README.md +0 -281
- package/iac/node_modules/aws-cdk-lib/aws-route53-patterns/README.md +0 -45
- package/iac/node_modules/aws-cdk-lib/aws-route53-targets/README.md +0 -181
- package/iac/node_modules/aws-cdk-lib/aws-route53recoverycontrol/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-route53recoveryreadiness/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-route53resolver/README.md +0 -32
- package/iac/node_modules/aws-cdk-lib/aws-rum/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-s3/README.md +0 -581
- package/iac/node_modules/aws-cdk-lib/aws-s3-assets/README.md +0 -179
- package/iac/node_modules/aws-cdk-lib/aws-s3-deployment/README.md +0 -349
- package/iac/node_modules/aws-cdk-lib/aws-s3-notifications/README.md +0 -46
- package/iac/node_modules/aws-cdk-lib/aws-s3objectlambda/README.md +0 -32
- package/iac/node_modules/aws-cdk-lib/aws-s3outposts/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-sagemaker/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-sam/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-sdb/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-secretsmanager/README.md +0 -285
- package/iac/node_modules/aws-cdk-lib/aws-securityhub/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-servicecatalog/README.md +0 -491
- package/iac/node_modules/aws-cdk-lib/aws-servicecatalogappregistry/README.md +0 -32
- package/iac/node_modules/aws-cdk-lib/aws-servicediscovery/README.md +0 -45
- package/iac/node_modules/aws-cdk-lib/aws-ses/README.md +0 -194
- package/iac/node_modules/aws-cdk-lib/aws-ses-actions/README.md +0 -16
- package/iac/node_modules/aws-cdk-lib/aws-signer/README.md +0 -41
- package/iac/node_modules/aws-cdk-lib/aws-sns/README.md +0 -184
- package/iac/node_modules/aws-cdk-lib/aws-sns-subscriptions/README.md +0 -120
- package/iac/node_modules/aws-cdk-lib/aws-sqs/README.md +0 -57
- package/iac/node_modules/aws-cdk-lib/aws-ssm/README.md +0 -99
- package/iac/node_modules/aws-cdk-lib/aws-ssmcontacts/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-ssmincidents/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-sso/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-stepfunctions/README.md +0 -884
- package/iac/node_modules/aws-cdk-lib/aws-stepfunctions-tasks/README.md +0 -1288
- package/iac/node_modules/aws-cdk-lib/aws-supportapp/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-synthetics/README.md +0 -32
- package/iac/node_modules/aws-cdk-lib/aws-timestream/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-transfer/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-voiceid/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-waf/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-wafregional/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-wafv2/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-wisdom/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-workspaces/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/aws-xray/README.md +0 -27
- package/iac/node_modules/aws-cdk-lib/cloud-assembly-schema/README.md +0 -55
- package/iac/node_modules/aws-cdk-lib/cloud-assembly-schema/schema/README.md +0 -5
- package/iac/node_modules/aws-cdk-lib/cloudformation-include/README.md +0 -466
- package/iac/node_modules/aws-cdk-lib/core/README.md +0 -1078
- package/iac/node_modules/aws-cdk-lib/custom-resources/README.md +0 -624
- package/iac/node_modules/aws-cdk-lib/cx-api/README.md +0 -98
- package/iac/node_modules/aws-cdk-lib/lambda-layer-awscli/README.md +0 -19
- package/iac/node_modules/aws-cdk-lib/lambda-layer-kubectl/README.md +0 -20
- package/iac/node_modules/aws-cdk-lib/lambda-layer-node-proxy-agent/README.md +0 -18
- package/iac/node_modules/aws-cdk-lib/node_modules/@balena/dockerignore/LICENSE.md +0 -206
- package/iac/node_modules/aws-cdk-lib/node_modules/@balena/dockerignore/README.md +0 -261
- package/iac/node_modules/aws-cdk-lib/node_modules/at-least-node/LICENSE +0 -6
- package/iac/node_modules/aws-cdk-lib/node_modules/at-least-node/README.md +0 -25
- package/iac/node_modules/aws-cdk-lib/node_modules/balanced-match/LICENSE.md +0 -21
- package/iac/node_modules/aws-cdk-lib/node_modules/balanced-match/README.md +0 -97
- package/iac/node_modules/aws-cdk-lib/node_modules/brace-expansion/LICENSE +0 -21
- package/iac/node_modules/aws-cdk-lib/node_modules/brace-expansion/README.md +0 -129
- package/iac/node_modules/aws-cdk-lib/node_modules/case/LICENSE +0 -22
- package/iac/node_modules/aws-cdk-lib/node_modules/case/README.md +0 -139
- package/iac/node_modules/aws-cdk-lib/node_modules/case/dist/Case.min.js.map +0 -1
- package/iac/node_modules/aws-cdk-lib/node_modules/case/dist/Case.plus.min.js.map +0 -1
- package/iac/node_modules/aws-cdk-lib/node_modules/concat-map/LICENSE +0 -18
- package/iac/node_modules/aws-cdk-lib/node_modules/concat-map/README.markdown +0 -62
- package/iac/node_modules/aws-cdk-lib/node_modules/fs-extra/LICENSE +0 -15
- package/iac/node_modules/aws-cdk-lib/node_modules/fs-extra/README.md +0 -264
- package/iac/node_modules/aws-cdk-lib/node_modules/graceful-fs/LICENSE +0 -15
- package/iac/node_modules/aws-cdk-lib/node_modules/graceful-fs/README.md +0 -143
- package/iac/node_modules/aws-cdk-lib/node_modules/ignore/README.md +0 -412
- package/iac/node_modules/aws-cdk-lib/node_modules/jsonfile/LICENSE +0 -15
- package/iac/node_modules/aws-cdk-lib/node_modules/jsonfile/README.md +0 -230
- package/iac/node_modules/aws-cdk-lib/node_modules/jsonschema/LICENSE +0 -21
- package/iac/node_modules/aws-cdk-lib/node_modules/jsonschema/README.md +0 -421
- package/iac/node_modules/aws-cdk-lib/node_modules/lru-cache/LICENSE +0 -15
- package/iac/node_modules/aws-cdk-lib/node_modules/lru-cache/README.md +0 -166
- package/iac/node_modules/aws-cdk-lib/node_modules/minimatch/LICENSE +0 -15
- package/iac/node_modules/aws-cdk-lib/node_modules/minimatch/README.md +0 -230
- package/iac/node_modules/aws-cdk-lib/node_modules/punycode/README.md +0 -122
- package/iac/node_modules/aws-cdk-lib/node_modules/semver/LICENSE +0 -15
- package/iac/node_modules/aws-cdk-lib/node_modules/semver/README.md +0 -568
- package/iac/node_modules/aws-cdk-lib/node_modules/universalify/LICENSE +0 -20
- package/iac/node_modules/aws-cdk-lib/node_modules/universalify/README.md +0 -76
- package/iac/node_modules/aws-cdk-lib/node_modules/yallist/LICENSE +0 -15
- package/iac/node_modules/aws-cdk-lib/node_modules/yallist/README.md +0 -204
- package/iac/node_modules/aws-cdk-lib/node_modules/yaml/LICENSE +0 -13
- package/iac/node_modules/aws-cdk-lib/node_modules/yaml/README.md +0 -127
- package/iac/node_modules/aws-cdk-lib/pipelines/README.md +0 -1573
- package/iac/node_modules/aws-cdk-lib/region-info/README.md +0 -84
- package/iac/node_modules/aws-cdk-lib/triggers/README.md +0 -86
- package/iac/node_modules/balanced-match/LICENSE.md +0 -21
- package/iac/node_modules/balanced-match/README.md +0 -97
- package/iac/node_modules/brace-expansion/LICENSE +0 -21
- package/iac/node_modules/brace-expansion/README.md +0 -129
- package/iac/node_modules/buffer-from/LICENSE +0 -21
- package/iac/node_modules/buffer-from/readme.md +0 -69
- package/iac/node_modules/case/LICENSE +0 -22
- package/iac/node_modules/case/README.md +0 -139
- package/iac/node_modules/case/dist/Case.min.js.map +0 -1
- package/iac/node_modules/case/dist/Case.plus.min.js.map +0 -1
- package/iac/node_modules/chalk/license +0 -9
- package/iac/node_modules/chalk/node_modules/ansi-styles/license +0 -9
- package/iac/node_modules/chalk/node_modules/ansi-styles/readme.md +0 -152
- package/iac/node_modules/chalk/readme.md +0 -341
- package/iac/node_modules/color-convert/LICENSE +0 -21
- package/iac/node_modules/color-convert/README.md +0 -68
- package/iac/node_modules/color-name/LICENSE +0 -8
- package/iac/node_modules/color-name/README.md +0 -11
- package/iac/node_modules/concat-map/LICENSE +0 -18
- package/iac/node_modules/concat-map/README.markdown +0 -62
- package/iac/node_modules/constructs/LICENSE +0 -202
- package/iac/node_modules/constructs/README.md +0 -28
- package/iac/node_modules/create-require/LICENSE +0 -25
- package/iac/node_modules/create-require/README.md +0 -46
- package/iac/node_modules/diff/LICENSE +0 -31
- package/iac/node_modules/diff/README.md +0 -207
- package/iac/node_modules/diff-sequences/LICENSE +0 -21
- package/iac/node_modules/diff-sequences/README.md +0 -404
- package/iac/node_modules/fs-extra/LICENSE +0 -15
- package/iac/node_modules/fs-extra/README.md +0 -264
- package/iac/node_modules/fsevents/LICENSE +0 -22
- package/iac/node_modules/fsevents/README.md +0 -83
- package/iac/node_modules/graceful-fs/LICENSE +0 -15
- package/iac/node_modules/graceful-fs/README.md +0 -143
- package/iac/node_modules/has-flag/license +0 -9
- package/iac/node_modules/has-flag/readme.md +0 -89
- package/iac/node_modules/ignore/README.md +0 -412
- package/iac/node_modules/jest-diff/LICENSE +0 -21
- package/iac/node_modules/jest-diff/README.md +0 -671
- package/iac/node_modules/jest-get-type/LICENSE +0 -21
- package/iac/node_modules/jest-matcher-utils/LICENSE +0 -21
- package/iac/node_modules/jest-matcher-utils/README.md +0 -24
- package/iac/node_modules/jsonfile/LICENSE +0 -15
- package/iac/node_modules/jsonfile/README.md +0 -230
- package/iac/node_modules/jsonschema/LICENSE +0 -21
- package/iac/node_modules/jsonschema/README.md +0 -421
- package/iac/node_modules/lru-cache/LICENSE +0 -15
- package/iac/node_modules/lru-cache/README.md +0 -166
- package/iac/node_modules/make-error/LICENSE +0 -5
- package/iac/node_modules/make-error/README.md +0 -112
- package/iac/node_modules/minimatch/LICENSE +0 -15
- package/iac/node_modules/minimatch/README.md +0 -230
- package/iac/node_modules/pretty-format/LICENSE +0 -21
- package/iac/node_modules/pretty-format/README.md +0 -458
- package/iac/node_modules/punycode/README.md +0 -122
- package/iac/node_modules/react-is/LICENSE +0 -21
- package/iac/node_modules/react-is/README.md +0 -104
- package/iac/node_modules/semver/LICENSE +0 -15
- package/iac/node_modules/semver/README.md +0 -568
- package/iac/node_modules/source-map/LICENSE +0 -28
- package/iac/node_modules/source-map/README.md +0 -742
- package/iac/node_modules/source-map/dist/source-map.min.js.map +0 -1
- package/iac/node_modules/source-map-support/LICENSE.md +0 -21
- package/iac/node_modules/source-map-support/README.md +0 -284
- package/iac/node_modules/supports-color/license +0 -9
- package/iac/node_modules/supports-color/readme.md +0 -76
- package/iac/node_modules/ts-node/LICENSE +0 -21
- package/iac/node_modules/ts-node/README.md +0 -1442
- package/iac/node_modules/ts-node/dist/bin-cwd.js.map +0 -1
- package/iac/node_modules/ts-node/dist/bin-esm.js.map +0 -1
- package/iac/node_modules/ts-node/dist/bin-script-deprecated.js.map +0 -1
- package/iac/node_modules/ts-node/dist/bin-script.js.map +0 -1
- package/iac/node_modules/ts-node/dist/bin-transpile.js.map +0 -1
- package/iac/node_modules/ts-node/dist/bin.js.map +0 -1
- package/iac/node_modules/ts-node/dist/child/argv-payload.js.map +0 -1
- package/iac/node_modules/ts-node/dist/child/child-entrypoint.js.map +0 -1
- package/iac/node_modules/ts-node/dist/child/child-loader.js.map +0 -1
- package/iac/node_modules/ts-node/dist/child/child-require.js.map +0 -1
- package/iac/node_modules/ts-node/dist/child/spawn-child.js.map +0 -1
- package/iac/node_modules/ts-node/dist/cjs-resolve-hooks.js.map +0 -1
- package/iac/node_modules/ts-node/dist/configuration.js.map +0 -1
- package/iac/node_modules/ts-node/dist/esm.js.map +0 -1
- package/iac/node_modules/ts-node/dist/file-extensions.js.map +0 -1
- package/iac/node_modules/ts-node/dist/index.js.map +0 -1
- package/iac/node_modules/ts-node/dist/module-type-classifier.js.map +0 -1
- package/iac/node_modules/ts-node/dist/node-module-type-classifier.js.map +0 -1
- package/iac/node_modules/ts-node/dist/repl.js.map +0 -1
- package/iac/node_modules/ts-node/dist/resolver-functions.js.map +0 -1
- package/iac/node_modules/ts-node/dist/transpilers/swc.js.map +0 -1
- package/iac/node_modules/ts-node/dist/transpilers/types.js.map +0 -1
- package/iac/node_modules/ts-node/dist/ts-compiler-types.js.map +0 -1
- package/iac/node_modules/ts-node/dist/ts-internals.js.map +0 -1
- package/iac/node_modules/ts-node/dist/ts-transpile-module.js.map +0 -1
- package/iac/node_modules/ts-node/dist/tsconfig-schema.js.map +0 -1
- package/iac/node_modules/ts-node/dist/tsconfigs.js.map +0 -1
- package/iac/node_modules/ts-node/dist/util.js.map +0 -1
- package/iac/node_modules/ts-node/dist-raw/README.md +0 -36
- package/iac/node_modules/typescript/LICENSE.txt +0 -55
- package/iac/node_modules/typescript/README.md +0 -104
- package/iac/node_modules/typescript/lib/README.md +0 -5
- package/iac/node_modules/universalify/LICENSE +0 -20
- package/iac/node_modules/universalify/README.md +0 -76
- package/iac/node_modules/v8-compile-cache-lib/LICENSE +0 -21
- package/iac/node_modules/v8-compile-cache-lib/README.md +0 -60
- package/iac/node_modules/yallist/LICENSE +0 -15
- package/iac/node_modules/yallist/README.md +0 -204
- package/iac/node_modules/yaml/LICENSE +0 -13
- package/iac/node_modules/yaml/README.md +0 -127
- package/iac/node_modules/yn/license +0 -9
- package/iac/node_modules/yn/readme.md +0 -83
- package/react/Edit.d.ts +0 -3
- package/react/Edit.js +0 -10
- package/react/Edit.js.map +0 -1
|
@@ -1,404 +0,0 @@
|
|
|
1
|
-
# diff-sequences
|
|
2
|
-
|
|
3
|
-
Compare items in two sequences to find a **longest common subsequence**.
|
|
4
|
-
|
|
5
|
-
The items not in common are the items to delete or insert in a **shortest edit script**.
|
|
6
|
-
|
|
7
|
-
To maximize flexibility and minimize memory, you write **callback** functions as configuration:
|
|
8
|
-
|
|
9
|
-
**Input** function `isCommon(aIndex, bIndex)` compares items at indexes in the sequences and returns a truthy/falsey value. This package might call your function more than once for some pairs of indexes.
|
|
10
|
-
|
|
11
|
-
- Because your function encapsulates **comparison**, this package can compare items according to `===` operator, `Object.is` method, or other criterion.
|
|
12
|
-
- Because your function encapsulates **sequences**, this package can find differences in arrays, strings, or other data.
|
|
13
|
-
|
|
14
|
-
**Output** function `foundSubsequence(nCommon, aCommon, bCommon)` receives the number of adjacent items and starting indexes of each common subsequence. If sequences do not have common items, then this package does not call your function.
|
|
15
|
-
|
|
16
|
-
If N is the sum of lengths of sequences and L is length of a longest common subsequence, then D = N – 2L is the number of **differences** in the corresponding shortest edit script.
|
|
17
|
-
|
|
18
|
-
[_An O(ND) Difference Algorithm and Its Variations_](http://xmailserver.org/diff2.pdf) by Eugene W. Myers is fast when sequences have **few** differences.
|
|
19
|
-
|
|
20
|
-
This package implements the **linear space** variation with optimizations so it is fast even when sequences have **many** differences.
|
|
21
|
-
|
|
22
|
-
## Usage
|
|
23
|
-
|
|
24
|
-
To add this package as a dependency of a project, do either of the following:
|
|
25
|
-
|
|
26
|
-
- `npm install diff-sequences`
|
|
27
|
-
- `yarn add diff-sequences`
|
|
28
|
-
|
|
29
|
-
To use `diff` as the name of the default export from this package, do either of the following:
|
|
30
|
-
|
|
31
|
-
- `var diff = require('diff-sequences').default; // CommonJS modules`
|
|
32
|
-
- `import diff from 'diff-sequences'; // ECMAScript modules`
|
|
33
|
-
|
|
34
|
-
Call `diff` with the **lengths** of sequences and your **callback** functions:
|
|
35
|
-
|
|
36
|
-
```js
|
|
37
|
-
const a = ['a', 'b', 'c', 'a', 'b', 'b', 'a'];
|
|
38
|
-
const b = ['c', 'b', 'a', 'b', 'a', 'c'];
|
|
39
|
-
|
|
40
|
-
function isCommon(aIndex, bIndex) {
|
|
41
|
-
return a[aIndex] === b[bIndex];
|
|
42
|
-
}
|
|
43
|
-
function foundSubsequence(nCommon, aCommon, bCommon) {
|
|
44
|
-
// see examples
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
diff(a.length, b.length, isCommon, foundSubsequence);
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
## Example of longest common subsequence
|
|
51
|
-
|
|
52
|
-
Some sequences (for example, `a` and `b` in the example of usage) have more than one longest common subsequence.
|
|
53
|
-
|
|
54
|
-
This package finds the following common items:
|
|
55
|
-
|
|
56
|
-
| comparisons of common items | values | output arguments |
|
|
57
|
-
| :------------------------------- | :--------- | --------------------------: |
|
|
58
|
-
| `a[2] === b[0]` | `'c'` | `foundSubsequence(1, 2, 0)` |
|
|
59
|
-
| `a[4] === b[1]` | `'b'` | `foundSubsequence(1, 4, 1)` |
|
|
60
|
-
| `a[5] === b[3] && a[6] === b[4]` | `'b', 'a'` | `foundSubsequence(2, 5, 3)` |
|
|
61
|
-
|
|
62
|
-
The “edit graph” analogy in the Myers paper shows the following common items:
|
|
63
|
-
|
|
64
|
-
| comparisons of common items | values |
|
|
65
|
-
| :------------------------------- | :--------- |
|
|
66
|
-
| `a[2] === b[0]` | `'c'` |
|
|
67
|
-
| `a[3] === b[2] && a[4] === b[3]` | `'a', 'b'` |
|
|
68
|
-
| `a[6] === b[4]` | `'a'` |
|
|
69
|
-
|
|
70
|
-
Various packages which implement the Myers algorithm will **always agree** on the **length** of a longest common subsequence, but might **sometimes disagree** on which **items** are in it.
|
|
71
|
-
|
|
72
|
-
## Example of callback functions to count common items
|
|
73
|
-
|
|
74
|
-
```js
|
|
75
|
-
// Return length of longest common subsequence according to === operator.
|
|
76
|
-
function countCommonItems(a, b) {
|
|
77
|
-
let n = 0;
|
|
78
|
-
function isCommon(aIndex, bIndex) {
|
|
79
|
-
return a[aIndex] === b[bIndex];
|
|
80
|
-
}
|
|
81
|
-
function foundSubsequence(nCommon) {
|
|
82
|
-
n += nCommon;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
diff(a.length, b.length, isCommon, foundSubsequence);
|
|
86
|
-
|
|
87
|
-
return n;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
const commonLength = countCommonItems(
|
|
91
|
-
['a', 'b', 'c', 'a', 'b', 'b', 'a'],
|
|
92
|
-
['c', 'b', 'a', 'b', 'a', 'c'],
|
|
93
|
-
);
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
| category of items | expression | value |
|
|
97
|
-
| :----------------- | ------------------------: | ----: |
|
|
98
|
-
| in common | `commonLength` | `4` |
|
|
99
|
-
| to delete from `a` | `a.length - commonLength` | `3` |
|
|
100
|
-
| to insert from `b` | `b.length - commonLength` | `2` |
|
|
101
|
-
|
|
102
|
-
If the length difference `b.length - a.length` is:
|
|
103
|
-
|
|
104
|
-
- negative: its absolute value is the minimum number of items to **delete** from `a`
|
|
105
|
-
- positive: it is the minimum number of items to **insert** from `b`
|
|
106
|
-
- zero: there is an **equal** number of items to delete from `a` and insert from `b`
|
|
107
|
-
- non-zero: there is an equal number of **additional** items to delete from `a` and insert from `b`
|
|
108
|
-
|
|
109
|
-
In this example, `6 - 7` is:
|
|
110
|
-
|
|
111
|
-
- negative: `1` is the minimum number of items to **delete** from `a`
|
|
112
|
-
- non-zero: `2` is the number of **additional** items to delete from `a` and insert from `b`
|
|
113
|
-
|
|
114
|
-
## Example of callback functions to find common items
|
|
115
|
-
|
|
116
|
-
```js
|
|
117
|
-
// Return array of items in longest common subsequence according to Object.is method.
|
|
118
|
-
const findCommonItems = (a, b) => {
|
|
119
|
-
const array = [];
|
|
120
|
-
diff(
|
|
121
|
-
a.length,
|
|
122
|
-
b.length,
|
|
123
|
-
(aIndex, bIndex) => Object.is(a[aIndex], b[bIndex]),
|
|
124
|
-
(nCommon, aCommon) => {
|
|
125
|
-
for (; nCommon !== 0; nCommon -= 1, aCommon += 1) {
|
|
126
|
-
array.push(a[aCommon]);
|
|
127
|
-
}
|
|
128
|
-
},
|
|
129
|
-
);
|
|
130
|
-
return array;
|
|
131
|
-
};
|
|
132
|
-
|
|
133
|
-
const commonItems = findCommonItems(
|
|
134
|
-
['a', 'b', 'c', 'a', 'b', 'b', 'a'],
|
|
135
|
-
['c', 'b', 'a', 'b', 'a', 'c'],
|
|
136
|
-
);
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
| `i` | `commonItems[i]` | `aIndex` |
|
|
140
|
-
| --: | :--------------- | -------: |
|
|
141
|
-
| `0` | `'c'` | `2` |
|
|
142
|
-
| `1` | `'b'` | `4` |
|
|
143
|
-
| `2` | `'b'` | `5` |
|
|
144
|
-
| `3` | `'a'` | `6` |
|
|
145
|
-
|
|
146
|
-
## Example of callback functions to diff index intervals
|
|
147
|
-
|
|
148
|
-
Instead of slicing array-like objects, you can adjust indexes in your callback functions.
|
|
149
|
-
|
|
150
|
-
```js
|
|
151
|
-
// Diff index intervals that are half open [start, end) like array slice method.
|
|
152
|
-
const diffIndexIntervals = (a, aStart, aEnd, b, bStart, bEnd) => {
|
|
153
|
-
// Validate: 0 <= aStart and aStart <= aEnd and aEnd <= a.length
|
|
154
|
-
// Validate: 0 <= bStart and bStart <= bEnd and bEnd <= b.length
|
|
155
|
-
|
|
156
|
-
diff(
|
|
157
|
-
aEnd - aStart,
|
|
158
|
-
bEnd - bStart,
|
|
159
|
-
(aIndex, bIndex) => Object.is(a[aStart + aIndex], b[bStart + bIndex]),
|
|
160
|
-
(nCommon, aCommon, bCommon) => {
|
|
161
|
-
// aStart + aCommon, bStart + bCommon
|
|
162
|
-
},
|
|
163
|
-
);
|
|
164
|
-
|
|
165
|
-
// After the last common subsequence, do any remaining work.
|
|
166
|
-
};
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
## Example of callback functions to emulate diff command
|
|
170
|
-
|
|
171
|
-
Linux or Unix has a `diff` command to compare files line by line. Its output is a **shortest edit script**:
|
|
172
|
-
|
|
173
|
-
- **c**hange adjacent lines from the first file to lines from the second file
|
|
174
|
-
- **d**elete lines from the first file
|
|
175
|
-
- **a**ppend or insert lines from the second file
|
|
176
|
-
|
|
177
|
-
```js
|
|
178
|
-
// Given zero-based half-open range [start, end) of array indexes,
|
|
179
|
-
// return one-based closed range [start + 1, end] as string.
|
|
180
|
-
const getRange = (start, end) =>
|
|
181
|
-
start + 1 === end ? `${start + 1}` : `${start + 1},${end}`;
|
|
182
|
-
|
|
183
|
-
// Given index intervals of lines to delete or insert, or both, or neither,
|
|
184
|
-
// push formatted diff lines onto array.
|
|
185
|
-
const pushDelIns = (aLines, aIndex, aEnd, bLines, bIndex, bEnd, array) => {
|
|
186
|
-
const deleteLines = aIndex !== aEnd;
|
|
187
|
-
const insertLines = bIndex !== bEnd;
|
|
188
|
-
const changeLines = deleteLines && insertLines;
|
|
189
|
-
if (changeLines) {
|
|
190
|
-
array.push(getRange(aIndex, aEnd) + 'c' + getRange(bIndex, bEnd));
|
|
191
|
-
} else if (deleteLines) {
|
|
192
|
-
array.push(getRange(aIndex, aEnd) + 'd' + String(bIndex));
|
|
193
|
-
} else if (insertLines) {
|
|
194
|
-
array.push(String(aIndex) + 'a' + getRange(bIndex, bEnd));
|
|
195
|
-
} else {
|
|
196
|
-
return;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
for (; aIndex !== aEnd; aIndex += 1) {
|
|
200
|
-
array.push('< ' + aLines[aIndex]); // delete is less than
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
if (changeLines) {
|
|
204
|
-
array.push('---');
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
for (; bIndex !== bEnd; bIndex += 1) {
|
|
208
|
-
array.push('> ' + bLines[bIndex]); // insert is greater than
|
|
209
|
-
}
|
|
210
|
-
};
|
|
211
|
-
|
|
212
|
-
// Given content of two files, return emulated output of diff utility.
|
|
213
|
-
const findShortestEditScript = (a, b) => {
|
|
214
|
-
const aLines = a.split('\n');
|
|
215
|
-
const bLines = b.split('\n');
|
|
216
|
-
const aLength = aLines.length;
|
|
217
|
-
const bLength = bLines.length;
|
|
218
|
-
|
|
219
|
-
const isCommon = (aIndex, bIndex) => aLines[aIndex] === bLines[bIndex];
|
|
220
|
-
|
|
221
|
-
let aIndex = 0;
|
|
222
|
-
let bIndex = 0;
|
|
223
|
-
const array = [];
|
|
224
|
-
const foundSubsequence = (nCommon, aCommon, bCommon) => {
|
|
225
|
-
pushDelIns(aLines, aIndex, aCommon, bLines, bIndex, bCommon, array);
|
|
226
|
-
aIndex = aCommon + nCommon; // number of lines compared in a
|
|
227
|
-
bIndex = bCommon + nCommon; // number of lines compared in b
|
|
228
|
-
};
|
|
229
|
-
|
|
230
|
-
diff(aLength, bLength, isCommon, foundSubsequence);
|
|
231
|
-
|
|
232
|
-
// After the last common subsequence, push remaining change lines.
|
|
233
|
-
pushDelIns(aLines, aIndex, aLength, bLines, bIndex, bLength, array);
|
|
234
|
-
|
|
235
|
-
return array.length === 0 ? '' : array.join('\n') + '\n';
|
|
236
|
-
};
|
|
237
|
-
```
|
|
238
|
-
|
|
239
|
-
## Example of callback functions to format diff lines
|
|
240
|
-
|
|
241
|
-
Here is simplified code to format **changed and unchanged lines** in expected and received values after a test fails in Jest:
|
|
242
|
-
|
|
243
|
-
```js
|
|
244
|
-
// Format diff with minus or plus for change lines and space for common lines.
|
|
245
|
-
const formatDiffLines = (a, b) => {
|
|
246
|
-
// Jest depends on pretty-format package to serialize objects as strings.
|
|
247
|
-
// Unindented for comparison to avoid distracting differences:
|
|
248
|
-
const aLinesUn = format(a, {indent: 0 /*, other options*/}).split('\n');
|
|
249
|
-
const bLinesUn = format(b, {indent: 0 /*, other options*/}).split('\n');
|
|
250
|
-
// Indented to display changed and unchanged lines:
|
|
251
|
-
const aLinesIn = format(a, {indent: 2 /*, other options*/}).split('\n');
|
|
252
|
-
const bLinesIn = format(b, {indent: 2 /*, other options*/}).split('\n');
|
|
253
|
-
|
|
254
|
-
const aLength = aLinesIn.length; // Validate: aLinesUn.length === aLength
|
|
255
|
-
const bLength = bLinesIn.length; // Validate: bLinesUn.length === bLength
|
|
256
|
-
|
|
257
|
-
const isCommon = (aIndex, bIndex) => aLinesUn[aIndex] === bLinesUn[bIndex];
|
|
258
|
-
|
|
259
|
-
// Only because the GitHub Flavored Markdown doc collapses adjacent spaces,
|
|
260
|
-
// this example code and the following table represent spaces as middle dots.
|
|
261
|
-
let aIndex = 0;
|
|
262
|
-
let bIndex = 0;
|
|
263
|
-
const array = [];
|
|
264
|
-
const foundSubsequence = (nCommon, aCommon, bCommon) => {
|
|
265
|
-
for (; aIndex !== aCommon; aIndex += 1) {
|
|
266
|
-
array.push('-·' + aLinesIn[aIndex]); // delete is minus
|
|
267
|
-
}
|
|
268
|
-
for (; bIndex !== bCommon; bIndex += 1) {
|
|
269
|
-
array.push('+·' + bLinesIn[bIndex]); // insert is plus
|
|
270
|
-
}
|
|
271
|
-
for (; nCommon !== 0; nCommon -= 1, aIndex += 1, bIndex += 1) {
|
|
272
|
-
// For common lines, received indentation seems more intuitive.
|
|
273
|
-
array.push('··' + bLinesIn[bIndex]); // common is space
|
|
274
|
-
}
|
|
275
|
-
};
|
|
276
|
-
|
|
277
|
-
diff(aLength, bLength, isCommon, foundSubsequence);
|
|
278
|
-
|
|
279
|
-
// After the last common subsequence, push remaining change lines.
|
|
280
|
-
for (; aIndex !== aLength; aIndex += 1) {
|
|
281
|
-
array.push('-·' + aLinesIn[aIndex]);
|
|
282
|
-
}
|
|
283
|
-
for (; bIndex !== bLength; bIndex += 1) {
|
|
284
|
-
array.push('+·' + bLinesIn[bIndex]);
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
return array;
|
|
288
|
-
};
|
|
289
|
-
|
|
290
|
-
const expected = {
|
|
291
|
-
searching: '',
|
|
292
|
-
sorting: {
|
|
293
|
-
ascending: true,
|
|
294
|
-
fieldKey: 'what',
|
|
295
|
-
},
|
|
296
|
-
};
|
|
297
|
-
const received = {
|
|
298
|
-
searching: '',
|
|
299
|
-
sorting: [
|
|
300
|
-
{
|
|
301
|
-
descending: false,
|
|
302
|
-
fieldKey: 'what',
|
|
303
|
-
},
|
|
304
|
-
],
|
|
305
|
-
};
|
|
306
|
-
|
|
307
|
-
const diffLines = formatDiffLines(expected, received);
|
|
308
|
-
```
|
|
309
|
-
|
|
310
|
-
If N is the sum of lengths of sequences and L is length of a longest common subsequence, then N – L is length of an array of diff lines. In this example, N is 7 + 9, L is 5, and N – L is 11.
|
|
311
|
-
|
|
312
|
-
| `i` | `diffLines[i]` | `aIndex` | `bIndex` |
|
|
313
|
-
| ---: | :--------------------------------- | -------: | -------: |
|
|
314
|
-
| `0` | `'··Object {'` | `0` | `0` |
|
|
315
|
-
| `1` | `'····"searching": "",'` | `1` | `1` |
|
|
316
|
-
| `2` | `'-···"sorting": Object {'` | `2` | |
|
|
317
|
-
| `3` | `'-·····"ascending": true,'` | `3` | |
|
|
318
|
-
| `4` | `'+·····"sorting": Array ['` | | `2` |
|
|
319
|
-
| `5` | `'+·······Object {'` | | `3` |
|
|
320
|
-
| `6` | `'+·········"descending": false,'` | | `4` |
|
|
321
|
-
| `7` | `'··········"fieldKey": "what",'` | `4` | `5` |
|
|
322
|
-
| `8` | `'········},'` | `5` | `6` |
|
|
323
|
-
| `9` | `'+·····],'` | | `7` |
|
|
324
|
-
| `10` | `'··}'` | `6` | `8` |
|
|
325
|
-
|
|
326
|
-
## Example of callback functions to find diff items
|
|
327
|
-
|
|
328
|
-
Here is simplified code to find changed and unchanged substrings **within adjacent changed lines** in expected and received values after a test fails in Jest:
|
|
329
|
-
|
|
330
|
-
```js
|
|
331
|
-
// Return diff items for strings (compatible with diff-match-patch package).
|
|
332
|
-
const findDiffItems = (a, b) => {
|
|
333
|
-
const isCommon = (aIndex, bIndex) => a[aIndex] === b[bIndex];
|
|
334
|
-
|
|
335
|
-
let aIndex = 0;
|
|
336
|
-
let bIndex = 0;
|
|
337
|
-
const array = [];
|
|
338
|
-
const foundSubsequence = (nCommon, aCommon, bCommon) => {
|
|
339
|
-
if (aIndex !== aCommon) {
|
|
340
|
-
array.push([-1, a.slice(aIndex, aCommon)]); // delete is -1
|
|
341
|
-
}
|
|
342
|
-
if (bIndex !== bCommon) {
|
|
343
|
-
array.push([1, b.slice(bIndex, bCommon)]); // insert is 1
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
aIndex = aCommon + nCommon; // number of characters compared in a
|
|
347
|
-
bIndex = bCommon + nCommon; // number of characters compared in b
|
|
348
|
-
array.push([0, a.slice(aCommon, aIndex)]); // common is 0
|
|
349
|
-
};
|
|
350
|
-
|
|
351
|
-
diff(a.length, b.length, isCommon, foundSubsequence);
|
|
352
|
-
|
|
353
|
-
// After the last common subsequence, push remaining change items.
|
|
354
|
-
if (aIndex !== a.length) {
|
|
355
|
-
array.push([-1, a.slice(aIndex)]);
|
|
356
|
-
}
|
|
357
|
-
if (bIndex !== b.length) {
|
|
358
|
-
array.push([1, b.slice(bIndex)]);
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
return array;
|
|
362
|
-
};
|
|
363
|
-
|
|
364
|
-
const expectedDeleted = ['"sorting": Object {', '"ascending": true,'].join(
|
|
365
|
-
'\n',
|
|
366
|
-
);
|
|
367
|
-
const receivedInserted = [
|
|
368
|
-
'"sorting": Array [',
|
|
369
|
-
'Object {',
|
|
370
|
-
'"descending": false,',
|
|
371
|
-
].join('\n');
|
|
372
|
-
|
|
373
|
-
const diffItems = findDiffItems(expectedDeleted, receivedInserted);
|
|
374
|
-
```
|
|
375
|
-
|
|
376
|
-
| `i` | `diffItems[i][0]` | `diffItems[i][1]` |
|
|
377
|
-
| --: | ----------------: | :---------------- |
|
|
378
|
-
| `0` | `0` | `'"sorting": '` |
|
|
379
|
-
| `1` | `1` | `'Array [\n'` |
|
|
380
|
-
| `2` | `0` | `'Object {\n"'` |
|
|
381
|
-
| `3` | `-1` | `'a'` |
|
|
382
|
-
| `4` | `1` | `'de'` |
|
|
383
|
-
| `5` | `0` | `'scending": '` |
|
|
384
|
-
| `6` | `-1` | `'tru'` |
|
|
385
|
-
| `7` | `1` | `'fals'` |
|
|
386
|
-
| `8` | `0` | `'e,'` |
|
|
387
|
-
|
|
388
|
-
The length difference `b.length - a.length` is equal to the sum of `diffItems[i][0]` values times `diffItems[i][1]` lengths. In this example, the difference `48 - 38` is equal to the sum `10`.
|
|
389
|
-
|
|
390
|
-
| category of diff item | `[0]` | `[1]` lengths | subtotal |
|
|
391
|
-
| :-------------------- | ----: | -----------------: | -------: |
|
|
392
|
-
| in common | `0` | `11 + 10 + 11 + 2` | `0` |
|
|
393
|
-
| to delete from `a` | `–1` | `1 + 3` | `-4` |
|
|
394
|
-
| to insert from `b` | `1` | `8 + 2 + 4` | `14` |
|
|
395
|
-
|
|
396
|
-
Instead of formatting the changed substrings with escape codes for colors in the `foundSubsequence` function to save memory, this example spends memory to **gain flexibility** before formatting, so a separate heuristic algorithm might modify the generic array of diff items to show changes more clearly:
|
|
397
|
-
|
|
398
|
-
| `i` | `diffItems[i][0]` | `diffItems[i][1]` |
|
|
399
|
-
| --: | ----------------: | :---------------- |
|
|
400
|
-
| `6` | `-1` | `'true'` |
|
|
401
|
-
| `7` | `1` | `'false'` |
|
|
402
|
-
| `8` | `0` | `','` |
|
|
403
|
-
|
|
404
|
-
For expected and received strings of serialized data, the result of finding changed **lines**, and then finding changed **substrings** within adjacent changed lines (as in the preceding two examples) sometimes displays the changes in a more intuitive way than the result of finding changed substrings, and then splitting them into changed and unchanged lines.
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
(The MIT License)
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2011-2017 JP Richardson
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files
|
|
6
|
-
(the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify,
|
|
7
|
-
merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
|
|
8
|
-
furnished to do so, subject to the following conditions:
|
|
9
|
-
|
|
10
|
-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
11
|
-
|
|
12
|
-
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
|
|
13
|
-
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
|
|
14
|
-
OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
15
|
-
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -1,264 +0,0 @@
|
|
|
1
|
-
Node.js: fs-extra
|
|
2
|
-
=================
|
|
3
|
-
|
|
4
|
-
`fs-extra` adds file system methods that aren't included in the native `fs` module and adds promise support to the `fs` methods. It also uses [`graceful-fs`](https://github.com/isaacs/node-graceful-fs) to prevent `EMFILE` errors. It should be a drop in replacement for `fs`.
|
|
5
|
-
|
|
6
|
-
[](https://www.npmjs.org/package/fs-extra)
|
|
7
|
-
[](https://github.com/jprichardson/node-fs-extra/blob/master/LICENSE)
|
|
8
|
-
[](http://travis-ci.org/jprichardson/node-fs-extra)
|
|
9
|
-
[](https://ci.appveyor.com/project/jprichardson/node-fs-extra/branch/master)
|
|
10
|
-
[](https://www.npmjs.org/package/fs-extra)
|
|
11
|
-
[](https://coveralls.io/github/jprichardson/node-fs-extra)
|
|
12
|
-
[](https://standardjs.com)
|
|
13
|
-
|
|
14
|
-
Why?
|
|
15
|
-
----
|
|
16
|
-
|
|
17
|
-
I got tired of including `mkdirp`, `rimraf`, and `ncp` in most of my projects.
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
Installation
|
|
23
|
-
------------
|
|
24
|
-
|
|
25
|
-
npm install fs-extra
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
Usage
|
|
30
|
-
-----
|
|
31
|
-
|
|
32
|
-
`fs-extra` is a drop in replacement for native `fs`. All methods in `fs` are attached to `fs-extra`. All `fs` methods return promises if the callback isn't passed.
|
|
33
|
-
|
|
34
|
-
You don't ever need to include the original `fs` module again:
|
|
35
|
-
|
|
36
|
-
```js
|
|
37
|
-
const fs = require('fs') // this is no longer necessary
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
you can now do this:
|
|
41
|
-
|
|
42
|
-
```js
|
|
43
|
-
const fs = require('fs-extra')
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
or if you prefer to make it clear that you're using `fs-extra` and not `fs`, you may want
|
|
47
|
-
to name your `fs` variable `fse` like so:
|
|
48
|
-
|
|
49
|
-
```js
|
|
50
|
-
const fse = require('fs-extra')
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
you can also keep both, but it's redundant:
|
|
54
|
-
|
|
55
|
-
```js
|
|
56
|
-
const fs = require('fs')
|
|
57
|
-
const fse = require('fs-extra')
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
Sync vs Async vs Async/Await
|
|
61
|
-
-------------
|
|
62
|
-
Most methods are async by default. All async methods will return a promise if the callback isn't passed.
|
|
63
|
-
|
|
64
|
-
Sync methods on the other hand will throw if an error occurs.
|
|
65
|
-
|
|
66
|
-
Also Async/Await will throw an error if one occurs.
|
|
67
|
-
|
|
68
|
-
Example:
|
|
69
|
-
|
|
70
|
-
```js
|
|
71
|
-
const fs = require('fs-extra')
|
|
72
|
-
|
|
73
|
-
// Async with promises:
|
|
74
|
-
fs.copy('/tmp/myfile', '/tmp/mynewfile')
|
|
75
|
-
.then(() => console.log('success!'))
|
|
76
|
-
.catch(err => console.error(err))
|
|
77
|
-
|
|
78
|
-
// Async with callbacks:
|
|
79
|
-
fs.copy('/tmp/myfile', '/tmp/mynewfile', err => {
|
|
80
|
-
if (err) return console.error(err)
|
|
81
|
-
console.log('success!')
|
|
82
|
-
})
|
|
83
|
-
|
|
84
|
-
// Sync:
|
|
85
|
-
try {
|
|
86
|
-
fs.copySync('/tmp/myfile', '/tmp/mynewfile')
|
|
87
|
-
console.log('success!')
|
|
88
|
-
} catch (err) {
|
|
89
|
-
console.error(err)
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
// Async/Await:
|
|
93
|
-
async function copyFiles () {
|
|
94
|
-
try {
|
|
95
|
-
await fs.copy('/tmp/myfile', '/tmp/mynewfile')
|
|
96
|
-
console.log('success!')
|
|
97
|
-
} catch (err) {
|
|
98
|
-
console.error(err)
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
copyFiles()
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
Methods
|
|
107
|
-
-------
|
|
108
|
-
|
|
109
|
-
### Async
|
|
110
|
-
|
|
111
|
-
- [copy](docs/copy.md)
|
|
112
|
-
- [emptyDir](docs/emptyDir.md)
|
|
113
|
-
- [ensureFile](docs/ensureFile.md)
|
|
114
|
-
- [ensureDir](docs/ensureDir.md)
|
|
115
|
-
- [ensureLink](docs/ensureLink.md)
|
|
116
|
-
- [ensureSymlink](docs/ensureSymlink.md)
|
|
117
|
-
- [mkdirp](docs/ensureDir.md)
|
|
118
|
-
- [mkdirs](docs/ensureDir.md)
|
|
119
|
-
- [move](docs/move.md)
|
|
120
|
-
- [outputFile](docs/outputFile.md)
|
|
121
|
-
- [outputJson](docs/outputJson.md)
|
|
122
|
-
- [pathExists](docs/pathExists.md)
|
|
123
|
-
- [readJson](docs/readJson.md)
|
|
124
|
-
- [remove](docs/remove.md)
|
|
125
|
-
- [writeJson](docs/writeJson.md)
|
|
126
|
-
|
|
127
|
-
### Sync
|
|
128
|
-
|
|
129
|
-
- [copySync](docs/copy-sync.md)
|
|
130
|
-
- [emptyDirSync](docs/emptyDir-sync.md)
|
|
131
|
-
- [ensureFileSync](docs/ensureFile-sync.md)
|
|
132
|
-
- [ensureDirSync](docs/ensureDir-sync.md)
|
|
133
|
-
- [ensureLinkSync](docs/ensureLink-sync.md)
|
|
134
|
-
- [ensureSymlinkSync](docs/ensureSymlink-sync.md)
|
|
135
|
-
- [mkdirpSync](docs/ensureDir-sync.md)
|
|
136
|
-
- [mkdirsSync](docs/ensureDir-sync.md)
|
|
137
|
-
- [moveSync](docs/move-sync.md)
|
|
138
|
-
- [outputFileSync](docs/outputFile-sync.md)
|
|
139
|
-
- [outputJsonSync](docs/outputJson-sync.md)
|
|
140
|
-
- [pathExistsSync](docs/pathExists-sync.md)
|
|
141
|
-
- [readJsonSync](docs/readJson-sync.md)
|
|
142
|
-
- [removeSync](docs/remove-sync.md)
|
|
143
|
-
- [writeJsonSync](docs/writeJson-sync.md)
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
**NOTE:** You can still use the native Node.js methods. They are promisified and copied over to `fs-extra`. See [notes on `fs.read()`, `fs.write()`, & `fs.writev()`](docs/fs-read-write-writev.md)
|
|
147
|
-
|
|
148
|
-
### What happened to `walk()` and `walkSync()`?
|
|
149
|
-
|
|
150
|
-
They were removed from `fs-extra` in v2.0.0. If you need the functionality, `walk` and `walkSync` are available as separate packages, [`klaw`](https://github.com/jprichardson/node-klaw) and [`klaw-sync`](https://github.com/manidlou/node-klaw-sync).
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
Third Party
|
|
154
|
-
-----------
|
|
155
|
-
|
|
156
|
-
### CLI
|
|
157
|
-
|
|
158
|
-
[fse-cli](https://www.npmjs.com/package/@atao60/fse-cli) allows you to run `fs-extra` from a console or from [npm](https://www.npmjs.com) scripts.
|
|
159
|
-
|
|
160
|
-
### TypeScript
|
|
161
|
-
|
|
162
|
-
If you like TypeScript, you can use `fs-extra` with it: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/fs-extra
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
### File / Directory Watching
|
|
166
|
-
|
|
167
|
-
If you want to watch for changes to files or directories, then you should use [chokidar](https://github.com/paulmillr/chokidar).
|
|
168
|
-
|
|
169
|
-
### Obtain Filesystem (Devices, Partitions) Information
|
|
170
|
-
|
|
171
|
-
[fs-filesystem](https://github.com/arthurintelligence/node-fs-filesystem) allows you to read the state of the filesystem of the host on which it is run. It returns information about both the devices and the partitions (volumes) of the system.
|
|
172
|
-
|
|
173
|
-
### Misc.
|
|
174
|
-
|
|
175
|
-
- [fs-extra-debug](https://github.com/jdxcode/fs-extra-debug) - Send your fs-extra calls to [debug](https://npmjs.org/package/debug).
|
|
176
|
-
- [mfs](https://github.com/cadorn/mfs) - Monitor your fs-extra calls.
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
Hacking on fs-extra
|
|
181
|
-
-------------------
|
|
182
|
-
|
|
183
|
-
Wanna hack on `fs-extra`? Great! Your help is needed! [fs-extra is one of the most depended upon Node.js packages](http://nodei.co/npm/fs-extra.png?downloads=true&downloadRank=true&stars=true). This project
|
|
184
|
-
uses [JavaScript Standard Style](https://github.com/feross/standard) - if the name or style choices bother you,
|
|
185
|
-
you're gonna have to get over it :) If `standard` is good enough for `npm`, it's good enough for `fs-extra`.
|
|
186
|
-
|
|
187
|
-
[](https://github.com/feross/standard)
|
|
188
|
-
|
|
189
|
-
What's needed?
|
|
190
|
-
- First, take a look at existing issues. Those are probably going to be where the priority lies.
|
|
191
|
-
- More tests for edge cases. Specifically on different platforms. There can never be enough tests.
|
|
192
|
-
- Improve test coverage. See coveralls output for more info.
|
|
193
|
-
|
|
194
|
-
Note: If you make any big changes, **you should definitely file an issue for discussion first.**
|
|
195
|
-
|
|
196
|
-
### Running the Test Suite
|
|
197
|
-
|
|
198
|
-
fs-extra contains hundreds of tests.
|
|
199
|
-
|
|
200
|
-
- `npm run lint`: runs the linter ([standard](http://standardjs.com/))
|
|
201
|
-
- `npm run unit`: runs the unit tests
|
|
202
|
-
- `npm test`: runs both the linter and the tests
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
### Windows
|
|
206
|
-
|
|
207
|
-
If you run the tests on the Windows and receive a lot of symbolic link `EPERM` permission errors, it's
|
|
208
|
-
because on Windows you need elevated privilege to create symbolic links. You can add this to your Windows's
|
|
209
|
-
account by following the instructions here: http://superuser.com/questions/104845/permission-to-make-symbolic-links-in-windows-7
|
|
210
|
-
However, I didn't have much luck doing this.
|
|
211
|
-
|
|
212
|
-
Since I develop on Mac OS X, I use VMWare Fusion for Windows testing. I create a shared folder that I map to a drive on Windows.
|
|
213
|
-
I open the `Node.js command prompt` and run as `Administrator`. I then map the network drive running the following command:
|
|
214
|
-
|
|
215
|
-
net use z: "\\vmware-host\Shared Folders"
|
|
216
|
-
|
|
217
|
-
I can then navigate to my `fs-extra` directory and run the tests.
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
Naming
|
|
221
|
-
------
|
|
222
|
-
|
|
223
|
-
I put a lot of thought into the naming of these functions. Inspired by @coolaj86's request. So he deserves much of the credit for raising the issue. See discussion(s) here:
|
|
224
|
-
|
|
225
|
-
* https://github.com/jprichardson/node-fs-extra/issues/2
|
|
226
|
-
* https://github.com/flatiron/utile/issues/11
|
|
227
|
-
* https://github.com/ryanmcgrath/wrench-js/issues/29
|
|
228
|
-
* https://github.com/substack/node-mkdirp/issues/17
|
|
229
|
-
|
|
230
|
-
First, I believe that in as many cases as possible, the [Node.js naming schemes](http://nodejs.org/api/fs.html) should be chosen. However, there are problems with the Node.js own naming schemes.
|
|
231
|
-
|
|
232
|
-
For example, `fs.readFile()` and `fs.readdir()`: the **F** is capitalized in *File* and the **d** is not capitalized in *dir*. Perhaps a bit pedantic, but they should still be consistent. Also, Node.js has chosen a lot of POSIX naming schemes, which I believe is great. See: `fs.mkdir()`, `fs.rmdir()`, `fs.chown()`, etc.
|
|
233
|
-
|
|
234
|
-
We have a dilemma though. How do you consistently name methods that perform the following POSIX commands: `cp`, `cp -r`, `mkdir -p`, and `rm -rf`?
|
|
235
|
-
|
|
236
|
-
My perspective: when in doubt, err on the side of simplicity. A directory is just a hierarchical grouping of directories and files. Consider that for a moment. So when you want to copy it or remove it, in most cases you'll want to copy or remove all of its contents. When you want to create a directory, if the directory that it's suppose to be contained in does not exist, then in most cases you'll want to create that too.
|
|
237
|
-
|
|
238
|
-
So, if you want to remove a file or a directory regardless of whether it has contents, just call `fs.remove(path)`. If you want to copy a file or a directory whether it has contents, just call `fs.copy(source, destination)`. If you want to create a directory regardless of whether its parent directories exist, just call `fs.mkdirs(path)` or `fs.mkdirp(path)`.
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
Credit
|
|
242
|
-
------
|
|
243
|
-
|
|
244
|
-
`fs-extra` wouldn't be possible without using the modules from the following authors:
|
|
245
|
-
|
|
246
|
-
- [Isaac Shlueter](https://github.com/isaacs)
|
|
247
|
-
- [Charlie McConnel](https://github.com/avianflu)
|
|
248
|
-
- [James Halliday](https://github.com/substack)
|
|
249
|
-
- [Andrew Kelley](https://github.com/andrewrk)
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
License
|
|
255
|
-
-------
|
|
256
|
-
|
|
257
|
-
Licensed under MIT
|
|
258
|
-
|
|
259
|
-
Copyright (c) 2011-2017 [JP Richardson](https://github.com/jprichardson)
|
|
260
|
-
|
|
261
|
-
[1]: http://nodejs.org/docs/latest/api/fs.html
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
[jsonfile]: https://github.com/jprichardson/node-jsonfile
|