cdktn 0.23.2 → 0.23.3
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/.jsii +34 -34
- package/README.md +1 -1
- package/lib/annotations.js +1 -1
- package/lib/app.js +1 -1
- package/lib/aspect.js +1 -1
- package/lib/backends/azurerm-backend.js +2 -2
- package/lib/backends/cloud-backend.js +4 -4
- package/lib/backends/consul-backend.js +2 -2
- package/lib/backends/cos-backend.js +2 -2
- package/lib/backends/gcs-backend.js +2 -2
- package/lib/backends/http-backend.js +2 -2
- package/lib/backends/local-backend.js +2 -2
- package/lib/backends/oss-backend.js +2 -2
- package/lib/backends/pg-backend.js +2 -2
- package/lib/backends/remote-backend.js +4 -4
- package/lib/backends/s3-backend.js +2 -2
- package/lib/backends/swift-backend.js +2 -2
- package/lib/complex-computed-list.js +25 -25
- package/lib/errors.d.ts +1 -2
- package/lib/errors.js +11 -8
- package/lib/functions/terraform-functions.generated.js +1 -1
- package/lib/importable-resource.js +1 -1
- package/lib/manifest.js +4 -5
- package/lib/resource.js +1 -1
- package/lib/synthesize/synthesizer.js +4 -5
- package/lib/terraform-asset.js +1 -1
- package/lib/terraform-backend.js +1 -1
- package/lib/terraform-count.js +1 -1
- package/lib/terraform-data-resource.js +1 -1
- package/lib/terraform-data-source.js +1 -1
- package/lib/terraform-dynamic-block.js +2 -2
- package/lib/terraform-dynamic-expression.js +2 -2
- package/lib/terraform-element.js +1 -1
- package/lib/terraform-functions.js +1 -1
- package/lib/terraform-hcl-module.js +1 -1
- package/lib/terraform-iterator.js +5 -5
- package/lib/terraform-local.js +1 -1
- package/lib/terraform-module.js +1 -1
- package/lib/terraform-operators.js +1 -1
- package/lib/terraform-output.js +1 -1
- package/lib/terraform-provider.js +1 -1
- package/lib/terraform-provisioner.js +1 -1
- package/lib/terraform-remote-state.js +1 -1
- package/lib/terraform-resource-targets.js +1 -1
- package/lib/terraform-resource.js +1 -1
- package/lib/terraform-stack.js +1 -1
- package/lib/terraform-variable.js +2 -2
- package/lib/testing/index.js +7 -8
- package/lib/testing/matchers.js +1 -1
- package/lib/tokens/lazy.js +4 -4
- package/lib/tokens/private/intrinsic.d.ts +0 -5
- package/lib/tokens/private/intrinsic.js +2 -9
- package/lib/tokens/private/stack-trace.d.ts +6 -0
- package/lib/tokens/private/stack-trace.js +14 -1
- package/lib/tokens/resolvable.js +4 -4
- package/lib/tokens/string-fragments.js +1 -1
- package/lib/tokens/token.js +2 -2
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/upgrade-id-aspect.js +1 -1
- package/node_modules/{call-bind-apply-helpers → safe-stable-stringify}/LICENSE +2 -2
- package/node_modules/safe-stable-stringify/esm/package.json +4 -0
- package/node_modules/safe-stable-stringify/esm/wrapper.d.ts +4 -0
- package/node_modules/safe-stable-stringify/esm/wrapper.js +6 -0
- package/node_modules/safe-stable-stringify/index.d.ts +22 -0
- package/node_modules/safe-stable-stringify/index.js +625 -0
- package/node_modules/safe-stable-stringify/package.json +65 -0
- package/node_modules/safe-stable-stringify/readme.md +179 -0
- package/package.json +5 -6
- package/node_modules/call-bind/.eslintignore +0 -1
- package/node_modules/call-bind/.eslintrc +0 -16
- package/node_modules/call-bind/.github/FUNDING.yml +0 -12
- package/node_modules/call-bind/.nycrc +0 -9
- package/node_modules/call-bind/CHANGELOG.md +0 -106
- package/node_modules/call-bind/LICENSE +0 -21
- package/node_modules/call-bind/README.md +0 -64
- package/node_modules/call-bind/callBound.js +0 -15
- package/node_modules/call-bind/index.js +0 -24
- package/node_modules/call-bind/package.json +0 -93
- package/node_modules/call-bind/test/callBound.js +0 -54
- package/node_modules/call-bind/test/index.js +0 -74
- package/node_modules/call-bind-apply-helpers/.eslintrc +0 -17
- package/node_modules/call-bind-apply-helpers/.github/FUNDING.yml +0 -12
- package/node_modules/call-bind-apply-helpers/.nycrc +0 -9
- package/node_modules/call-bind-apply-helpers/CHANGELOG.md +0 -30
- package/node_modules/call-bind-apply-helpers/README.md +0 -62
- package/node_modules/call-bind-apply-helpers/actualApply.d.ts +0 -1
- package/node_modules/call-bind-apply-helpers/actualApply.js +0 -10
- package/node_modules/call-bind-apply-helpers/applyBind.d.ts +0 -19
- package/node_modules/call-bind-apply-helpers/applyBind.js +0 -10
- package/node_modules/call-bind-apply-helpers/functionApply.d.ts +0 -1
- package/node_modules/call-bind-apply-helpers/functionApply.js +0 -4
- package/node_modules/call-bind-apply-helpers/functionCall.d.ts +0 -1
- package/node_modules/call-bind-apply-helpers/functionCall.js +0 -4
- package/node_modules/call-bind-apply-helpers/index.d.ts +0 -64
- package/node_modules/call-bind-apply-helpers/index.js +0 -15
- package/node_modules/call-bind-apply-helpers/package.json +0 -85
- package/node_modules/call-bind-apply-helpers/reflectApply.d.ts +0 -3
- package/node_modules/call-bind-apply-helpers/reflectApply.js +0 -4
- package/node_modules/call-bind-apply-helpers/test/index.js +0 -63
- package/node_modules/call-bind-apply-helpers/tsconfig.json +0 -9
- package/node_modules/call-bound/.eslintrc +0 -13
- package/node_modules/call-bound/.github/FUNDING.yml +0 -12
- package/node_modules/call-bound/.nycrc +0 -9
- package/node_modules/call-bound/CHANGELOG.md +0 -42
- package/node_modules/call-bound/LICENSE +0 -21
- package/node_modules/call-bound/README.md +0 -53
- package/node_modules/call-bound/index.d.ts +0 -94
- package/node_modules/call-bound/index.js +0 -19
- package/node_modules/call-bound/package.json +0 -99
- package/node_modules/call-bound/test/index.js +0 -61
- package/node_modules/call-bound/tsconfig.json +0 -10
- package/node_modules/define-data-property/.eslintrc +0 -24
- package/node_modules/define-data-property/.github/FUNDING.yml +0 -12
- package/node_modules/define-data-property/.nycrc +0 -13
- package/node_modules/define-data-property/CHANGELOG.md +0 -70
- package/node_modules/define-data-property/LICENSE +0 -21
- package/node_modules/define-data-property/README.md +0 -67
- package/node_modules/define-data-property/index.d.ts +0 -12
- package/node_modules/define-data-property/index.js +0 -56
- package/node_modules/define-data-property/package.json +0 -106
- package/node_modules/define-data-property/test/index.js +0 -392
- package/node_modules/define-data-property/tsconfig.json +0 -59
- package/node_modules/dunder-proto/.eslintrc +0 -5
- package/node_modules/dunder-proto/.github/FUNDING.yml +0 -12
- package/node_modules/dunder-proto/.nycrc +0 -13
- package/node_modules/dunder-proto/CHANGELOG.md +0 -24
- package/node_modules/dunder-proto/LICENSE +0 -21
- package/node_modules/dunder-proto/README.md +0 -54
- package/node_modules/dunder-proto/get.d.ts +0 -5
- package/node_modules/dunder-proto/get.js +0 -30
- package/node_modules/dunder-proto/package.json +0 -76
- package/node_modules/dunder-proto/set.d.ts +0 -5
- package/node_modules/dunder-proto/set.js +0 -35
- package/node_modules/dunder-proto/test/get.js +0 -34
- package/node_modules/dunder-proto/test/index.js +0 -4
- package/node_modules/dunder-proto/test/set.js +0 -50
- package/node_modules/dunder-proto/tsconfig.json +0 -9
- package/node_modules/es-define-property/.eslintrc +0 -13
- package/node_modules/es-define-property/.github/FUNDING.yml +0 -12
- package/node_modules/es-define-property/.nycrc +0 -9
- package/node_modules/es-define-property/CHANGELOG.md +0 -29
- package/node_modules/es-define-property/LICENSE +0 -21
- package/node_modules/es-define-property/README.md +0 -49
- package/node_modules/es-define-property/index.d.ts +0 -3
- package/node_modules/es-define-property/index.js +0 -14
- package/node_modules/es-define-property/package.json +0 -81
- package/node_modules/es-define-property/test/index.js +0 -56
- package/node_modules/es-define-property/tsconfig.json +0 -10
- package/node_modules/es-errors/.eslintrc +0 -5
- package/node_modules/es-errors/.github/FUNDING.yml +0 -12
- package/node_modules/es-errors/CHANGELOG.md +0 -40
- package/node_modules/es-errors/LICENSE +0 -21
- package/node_modules/es-errors/README.md +0 -55
- package/node_modules/es-errors/eval.d.ts +0 -3
- package/node_modules/es-errors/eval.js +0 -4
- package/node_modules/es-errors/index.d.ts +0 -3
- package/node_modules/es-errors/index.js +0 -4
- package/node_modules/es-errors/package.json +0 -80
- package/node_modules/es-errors/range.d.ts +0 -3
- package/node_modules/es-errors/range.js +0 -4
- package/node_modules/es-errors/ref.d.ts +0 -3
- package/node_modules/es-errors/ref.js +0 -4
- package/node_modules/es-errors/syntax.d.ts +0 -3
- package/node_modules/es-errors/syntax.js +0 -4
- package/node_modules/es-errors/test/index.js +0 -19
- package/node_modules/es-errors/tsconfig.json +0 -49
- package/node_modules/es-errors/type.d.ts +0 -3
- package/node_modules/es-errors/type.js +0 -4
- package/node_modules/es-errors/uri.d.ts +0 -3
- package/node_modules/es-errors/uri.js +0 -4
- package/node_modules/es-object-atoms/.eslintrc +0 -16
- package/node_modules/es-object-atoms/.github/FUNDING.yml +0 -12
- package/node_modules/es-object-atoms/CHANGELOG.md +0 -37
- package/node_modules/es-object-atoms/LICENSE +0 -21
- package/node_modules/es-object-atoms/README.md +0 -63
- package/node_modules/es-object-atoms/RequireObjectCoercible.d.ts +0 -3
- package/node_modules/es-object-atoms/RequireObjectCoercible.js +0 -11
- package/node_modules/es-object-atoms/ToObject.d.ts +0 -7
- package/node_modules/es-object-atoms/ToObject.js +0 -10
- package/node_modules/es-object-atoms/index.d.ts +0 -3
- package/node_modules/es-object-atoms/index.js +0 -4
- package/node_modules/es-object-atoms/isObject.d.ts +0 -3
- package/node_modules/es-object-atoms/isObject.js +0 -6
- package/node_modules/es-object-atoms/package.json +0 -80
- package/node_modules/es-object-atoms/test/index.js +0 -38
- package/node_modules/es-object-atoms/tsconfig.json +0 -6
- package/node_modules/function-bind/.eslintrc +0 -21
- package/node_modules/function-bind/.github/FUNDING.yml +0 -12
- package/node_modules/function-bind/.github/SECURITY.md +0 -3
- package/node_modules/function-bind/.nycrc +0 -13
- package/node_modules/function-bind/CHANGELOG.md +0 -136
- package/node_modules/function-bind/LICENSE +0 -20
- package/node_modules/function-bind/README.md +0 -46
- package/node_modules/function-bind/implementation.js +0 -84
- package/node_modules/function-bind/index.js +0 -5
- package/node_modules/function-bind/package.json +0 -87
- package/node_modules/function-bind/test/.eslintrc +0 -9
- package/node_modules/function-bind/test/index.js +0 -252
- package/node_modules/get-intrinsic/.eslintrc +0 -42
- package/node_modules/get-intrinsic/.github/FUNDING.yml +0 -12
- package/node_modules/get-intrinsic/.nycrc +0 -9
- package/node_modules/get-intrinsic/CHANGELOG.md +0 -186
- package/node_modules/get-intrinsic/LICENSE +0 -21
- package/node_modules/get-intrinsic/README.md +0 -71
- package/node_modules/get-intrinsic/index.js +0 -378
- package/node_modules/get-intrinsic/package.json +0 -97
- package/node_modules/get-intrinsic/test/GetIntrinsic.js +0 -274
- package/node_modules/get-proto/.eslintrc +0 -10
- package/node_modules/get-proto/.github/FUNDING.yml +0 -12
- package/node_modules/get-proto/.nycrc +0 -9
- package/node_modules/get-proto/CHANGELOG.md +0 -21
- package/node_modules/get-proto/LICENSE +0 -21
- package/node_modules/get-proto/Object.getPrototypeOf.d.ts +0 -5
- package/node_modules/get-proto/Object.getPrototypeOf.js +0 -6
- package/node_modules/get-proto/README.md +0 -50
- package/node_modules/get-proto/Reflect.getPrototypeOf.d.ts +0 -3
- package/node_modules/get-proto/Reflect.getPrototypeOf.js +0 -4
- package/node_modules/get-proto/index.d.ts +0 -5
- package/node_modules/get-proto/index.js +0 -27
- package/node_modules/get-proto/package.json +0 -81
- package/node_modules/get-proto/test/index.js +0 -68
- package/node_modules/get-proto/tsconfig.json +0 -9
- package/node_modules/gopd/.eslintrc +0 -16
- package/node_modules/gopd/.github/FUNDING.yml +0 -12
- package/node_modules/gopd/CHANGELOG.md +0 -45
- package/node_modules/gopd/LICENSE +0 -21
- package/node_modules/gopd/README.md +0 -40
- package/node_modules/gopd/gOPD.d.ts +0 -1
- package/node_modules/gopd/gOPD.js +0 -4
- package/node_modules/gopd/index.d.ts +0 -5
- package/node_modules/gopd/index.js +0 -15
- package/node_modules/gopd/package.json +0 -77
- package/node_modules/gopd/test/index.js +0 -36
- package/node_modules/gopd/tsconfig.json +0 -9
- package/node_modules/has-property-descriptors/.eslintrc +0 -13
- package/node_modules/has-property-descriptors/.github/FUNDING.yml +0 -12
- package/node_modules/has-property-descriptors/.nycrc +0 -9
- package/node_modules/has-property-descriptors/CHANGELOG.md +0 -35
- package/node_modules/has-property-descriptors/LICENSE +0 -21
- package/node_modules/has-property-descriptors/README.md +0 -43
- package/node_modules/has-property-descriptors/index.js +0 -22
- package/node_modules/has-property-descriptors/package.json +0 -77
- package/node_modules/has-property-descriptors/test/index.js +0 -57
- package/node_modules/has-symbols/.eslintrc +0 -11
- package/node_modules/has-symbols/.github/FUNDING.yml +0 -12
- package/node_modules/has-symbols/.nycrc +0 -9
- package/node_modules/has-symbols/CHANGELOG.md +0 -91
- package/node_modules/has-symbols/LICENSE +0 -21
- package/node_modules/has-symbols/README.md +0 -46
- package/node_modules/has-symbols/index.d.ts +0 -3
- package/node_modules/has-symbols/index.js +0 -14
- package/node_modules/has-symbols/package.json +0 -111
- package/node_modules/has-symbols/shams.d.ts +0 -3
- package/node_modules/has-symbols/shams.js +0 -45
- package/node_modules/has-symbols/test/index.js +0 -22
- package/node_modules/has-symbols/test/shams/core-js.js +0 -29
- package/node_modules/has-symbols/test/shams/get-own-property-symbols.js +0 -29
- package/node_modules/has-symbols/test/tests.js +0 -58
- package/node_modules/has-symbols/tsconfig.json +0 -10
- package/node_modules/hasown/.eslintrc +0 -5
- package/node_modules/hasown/.github/FUNDING.yml +0 -12
- package/node_modules/hasown/.nycrc +0 -13
- package/node_modules/hasown/CHANGELOG.md +0 -40
- package/node_modules/hasown/LICENSE +0 -21
- package/node_modules/hasown/README.md +0 -40
- package/node_modules/hasown/index.d.ts +0 -3
- package/node_modules/hasown/index.js +0 -8
- package/node_modules/hasown/package.json +0 -92
- package/node_modules/hasown/tsconfig.json +0 -6
- package/node_modules/isarray/LICENSE +0 -21
- package/node_modules/isarray/README.md +0 -38
- package/node_modules/isarray/index.js +0 -5
- package/node_modules/isarray/package.json +0 -48
- package/node_modules/json-stable-stringify/.eslintrc +0 -31
- package/node_modules/json-stable-stringify/.github/FUNDING.yml +0 -12
- package/node_modules/json-stable-stringify/CHANGELOG.md +0 -160
- package/node_modules/json-stable-stringify/LICENSE +0 -21
- package/node_modules/json-stable-stringify/README.md +0 -157
- package/node_modules/json-stable-stringify/example/key_cmp.js +0 -9
- package/node_modules/json-stable-stringify/example/nested.js +0 -7
- package/node_modules/json-stable-stringify/example/str.js +0 -7
- package/node_modules/json-stable-stringify/example/value_cmp.js +0 -12
- package/node_modules/json-stable-stringify/index.d.ts +0 -25
- package/node_modules/json-stable-stringify/index.js +0 -124
- package/node_modules/json-stable-stringify/package.json +0 -88
- package/node_modules/json-stable-stringify/test/cmp.js +0 -33
- package/node_modules/json-stable-stringify/test/nested.js +0 -48
- package/node_modules/json-stable-stringify/test/replacer.js +0 -81
- package/node_modules/json-stable-stringify/test/space.js +0 -127
- package/node_modules/json-stable-stringify/test/str.js +0 -46
- package/node_modules/json-stable-stringify/test/to-json.js +0 -22
- package/node_modules/json-stable-stringify/tsconfig.json +0 -10
- package/node_modules/jsonify/.eslintrc +0 -21
- package/node_modules/jsonify/.github/FUNDING.yml +0 -12
- package/node_modules/jsonify/CHANGELOG.md +0 -48
- package/node_modules/jsonify/README.md +0 -66
- package/node_modules/jsonify/index.js +0 -4
- package/node_modules/jsonify/lib/parse.js +0 -261
- package/node_modules/jsonify/lib/stringify.js +0 -151
- package/node_modules/jsonify/package.json +0 -62
- package/node_modules/jsonify/test/parse.js +0 -20
- package/node_modules/jsonify/test/stringify.js +0 -18
- package/node_modules/math-intrinsics/.eslintrc +0 -16
- package/node_modules/math-intrinsics/.github/FUNDING.yml +0 -12
- package/node_modules/math-intrinsics/CHANGELOG.md +0 -24
- package/node_modules/math-intrinsics/LICENSE +0 -21
- package/node_modules/math-intrinsics/README.md +0 -50
- package/node_modules/math-intrinsics/abs.d.ts +0 -1
- package/node_modules/math-intrinsics/abs.js +0 -4
- package/node_modules/math-intrinsics/constants/maxArrayLength.d.ts +0 -3
- package/node_modules/math-intrinsics/constants/maxArrayLength.js +0 -4
- package/node_modules/math-intrinsics/constants/maxSafeInteger.d.ts +0 -3
- package/node_modules/math-intrinsics/constants/maxSafeInteger.js +0 -5
- package/node_modules/math-intrinsics/constants/maxValue.d.ts +0 -3
- package/node_modules/math-intrinsics/constants/maxValue.js +0 -5
- package/node_modules/math-intrinsics/floor.d.ts +0 -1
- package/node_modules/math-intrinsics/floor.js +0 -4
- package/node_modules/math-intrinsics/isFinite.d.ts +0 -3
- package/node_modules/math-intrinsics/isFinite.js +0 -12
- package/node_modules/math-intrinsics/isInteger.d.ts +0 -3
- package/node_modules/math-intrinsics/isInteger.js +0 -16
- package/node_modules/math-intrinsics/isNaN.d.ts +0 -1
- package/node_modules/math-intrinsics/isNaN.js +0 -6
- package/node_modules/math-intrinsics/isNegativeZero.d.ts +0 -3
- package/node_modules/math-intrinsics/isNegativeZero.js +0 -6
- package/node_modules/math-intrinsics/max.d.ts +0 -1
- package/node_modules/math-intrinsics/max.js +0 -4
- package/node_modules/math-intrinsics/min.d.ts +0 -1
- package/node_modules/math-intrinsics/min.js +0 -4
- package/node_modules/math-intrinsics/mod.d.ts +0 -3
- package/node_modules/math-intrinsics/mod.js +0 -9
- package/node_modules/math-intrinsics/package.json +0 -86
- package/node_modules/math-intrinsics/pow.d.ts +0 -1
- package/node_modules/math-intrinsics/pow.js +0 -4
- package/node_modules/math-intrinsics/round.d.ts +0 -1
- package/node_modules/math-intrinsics/round.js +0 -4
- package/node_modules/math-intrinsics/sign.d.ts +0 -3
- package/node_modules/math-intrinsics/sign.js +0 -11
- package/node_modules/math-intrinsics/test/index.js +0 -192
- package/node_modules/math-intrinsics/tsconfig.json +0 -3
- package/node_modules/object-keys/.editorconfig +0 -13
- package/node_modules/object-keys/.eslintrc +0 -17
- package/node_modules/object-keys/.travis.yml +0 -277
- package/node_modules/object-keys/CHANGELOG.md +0 -232
- package/node_modules/object-keys/LICENSE +0 -21
- package/node_modules/object-keys/README.md +0 -76
- package/node_modules/object-keys/implementation.js +0 -122
- package/node_modules/object-keys/index.js +0 -32
- package/node_modules/object-keys/isArguments.js +0 -17
- package/node_modules/object-keys/package.json +0 -88
- package/node_modules/object-keys/test/index.js +0 -5
- package/node_modules/set-function-length/.eslintrc +0 -27
- package/node_modules/set-function-length/.github/FUNDING.yml +0 -12
- package/node_modules/set-function-length/.nycrc +0 -13
- package/node_modules/set-function-length/CHANGELOG.md +0 -70
- package/node_modules/set-function-length/LICENSE +0 -21
- package/node_modules/set-function-length/README.md +0 -56
- package/node_modules/set-function-length/env.d.ts +0 -9
- package/node_modules/set-function-length/env.js +0 -25
- package/node_modules/set-function-length/index.d.ts +0 -7
- package/node_modules/set-function-length/index.js +0 -42
- package/node_modules/set-function-length/package.json +0 -102
- package/node_modules/set-function-length/tsconfig.json +0 -9
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "hasown",
|
|
3
|
-
"version": "2.0.2",
|
|
4
|
-
"description": "A robust, ES3 compatible, \"has own property\" predicate.",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"exports": {
|
|
7
|
-
".": "./index.js",
|
|
8
|
-
"./package.json": "./package.json"
|
|
9
|
-
},
|
|
10
|
-
"types": "index.d.ts",
|
|
11
|
-
"sideEffects": false,
|
|
12
|
-
"scripts": {
|
|
13
|
-
"prepack": "npmignore --auto --commentLines=autogenerated",
|
|
14
|
-
"prepublish": "not-in-publish || npm run prepublishOnly",
|
|
15
|
-
"prepublishOnly": "safe-publish-latest",
|
|
16
|
-
"prelint": "evalmd README.md",
|
|
17
|
-
"lint": "eslint --ext=js,mjs .",
|
|
18
|
-
"postlint": "npm run tsc",
|
|
19
|
-
"pretest": "npm run lint",
|
|
20
|
-
"tsc": "tsc -p .",
|
|
21
|
-
"posttsc": "attw -P",
|
|
22
|
-
"tests-only": "nyc tape 'test/**/*.js'",
|
|
23
|
-
"test": "npm run tests-only",
|
|
24
|
-
"posttest": "aud --production",
|
|
25
|
-
"version": "auto-changelog && git add CHANGELOG.md",
|
|
26
|
-
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
|
|
27
|
-
},
|
|
28
|
-
"repository": {
|
|
29
|
-
"type": "git",
|
|
30
|
-
"url": "git+https://github.com/inspect-js/hasOwn.git"
|
|
31
|
-
},
|
|
32
|
-
"keywords": [
|
|
33
|
-
"has",
|
|
34
|
-
"hasOwnProperty",
|
|
35
|
-
"hasOwn",
|
|
36
|
-
"has-own",
|
|
37
|
-
"own",
|
|
38
|
-
"has",
|
|
39
|
-
"property",
|
|
40
|
-
"in",
|
|
41
|
-
"javascript",
|
|
42
|
-
"ecmascript"
|
|
43
|
-
],
|
|
44
|
-
"author": "Jordan Harband <ljharb@gmail.com>",
|
|
45
|
-
"license": "MIT",
|
|
46
|
-
"bugs": {
|
|
47
|
-
"url": "https://github.com/inspect-js/hasOwn/issues"
|
|
48
|
-
},
|
|
49
|
-
"homepage": "https://github.com/inspect-js/hasOwn#readme",
|
|
50
|
-
"dependencies": {
|
|
51
|
-
"function-bind": "^1.1.2"
|
|
52
|
-
},
|
|
53
|
-
"devDependencies": {
|
|
54
|
-
"@arethetypeswrong/cli": "^0.15.1",
|
|
55
|
-
"@ljharb/eslint-config": "^21.1.0",
|
|
56
|
-
"@ljharb/tsconfig": "^0.2.0",
|
|
57
|
-
"@types/function-bind": "^1.1.10",
|
|
58
|
-
"@types/mock-property": "^1.0.2",
|
|
59
|
-
"@types/tape": "^5.6.4",
|
|
60
|
-
"aud": "^2.0.4",
|
|
61
|
-
"auto-changelog": "^2.4.0",
|
|
62
|
-
"eslint": "=8.8.0",
|
|
63
|
-
"evalmd": "^0.0.19",
|
|
64
|
-
"in-publish": "^2.0.1",
|
|
65
|
-
"mock-property": "^1.0.3",
|
|
66
|
-
"npmignore": "^0.3.1",
|
|
67
|
-
"nyc": "^10.3.2",
|
|
68
|
-
"safe-publish-latest": "^2.0.0",
|
|
69
|
-
"tape": "^5.7.5",
|
|
70
|
-
"typescript": "next"
|
|
71
|
-
},
|
|
72
|
-
"engines": {
|
|
73
|
-
"node": ">= 0.4"
|
|
74
|
-
},
|
|
75
|
-
"testling": {
|
|
76
|
-
"files": "test/index.js"
|
|
77
|
-
},
|
|
78
|
-
"auto-changelog": {
|
|
79
|
-
"output": "CHANGELOG.md",
|
|
80
|
-
"template": "keepachangelog",
|
|
81
|
-
"unreleased": false,
|
|
82
|
-
"commitLimit": false,
|
|
83
|
-
"backfillLimit": false,
|
|
84
|
-
"hideCredit": true
|
|
85
|
-
},
|
|
86
|
-
"publishConfig": {
|
|
87
|
-
"ignore": [
|
|
88
|
-
".github/workflows",
|
|
89
|
-
"test"
|
|
90
|
-
]
|
|
91
|
-
}
|
|
92
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
# isarray
|
|
3
|
-
|
|
4
|
-
`Array#isArray` for older browsers and deprecated Node.js versions.
|
|
5
|
-
|
|
6
|
-
[](http://travis-ci.org/juliangruber/isarray)
|
|
7
|
-
[](https://www.npmjs.org/package/isarray)
|
|
8
|
-
|
|
9
|
-
[
|
|
10
|
-
](https://ci.testling.com/juliangruber/isarray)
|
|
11
|
-
|
|
12
|
-
__Just use Array.isArray directly__, unless you need to support those older versions.
|
|
13
|
-
|
|
14
|
-
## Usage
|
|
15
|
-
|
|
16
|
-
```js
|
|
17
|
-
var isArray = require('isarray');
|
|
18
|
-
|
|
19
|
-
console.log(isArray([])); // => true
|
|
20
|
-
console.log(isArray({})); // => false
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
## Installation
|
|
24
|
-
|
|
25
|
-
With [npm](https://npmjs.org) do
|
|
26
|
-
|
|
27
|
-
```bash
|
|
28
|
-
$ npm install isarray
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
Then bundle for the browser with
|
|
32
|
-
[browserify](https://github.com/substack/node-browserify).
|
|
33
|
-
|
|
34
|
-
## Sponsors
|
|
35
|
-
|
|
36
|
-
This module is proudly supported by my [Sponsors](https://github.com/juliangruber/sponsors)!
|
|
37
|
-
|
|
38
|
-
Do you want to support modules like this to improve their quality, stability and weigh in on new features? Then please consider donating to my [Patreon](https://www.patreon.com/juliangruber). Not sure how much of my modules you're using? Try [feross/thanks](https://github.com/feross/thanks)!
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "isarray",
|
|
3
|
-
"description": "Array#isArray for older browsers",
|
|
4
|
-
"version": "2.0.5",
|
|
5
|
-
"repository": {
|
|
6
|
-
"type": "git",
|
|
7
|
-
"url": "git://github.com/juliangruber/isarray.git"
|
|
8
|
-
},
|
|
9
|
-
"homepage": "https://github.com/juliangruber/isarray",
|
|
10
|
-
"main": "index.js",
|
|
11
|
-
"files": [
|
|
12
|
-
"index.js"
|
|
13
|
-
],
|
|
14
|
-
"dependencies": {},
|
|
15
|
-
"devDependencies": {
|
|
16
|
-
"tape": "~2.13.4"
|
|
17
|
-
},
|
|
18
|
-
"keywords": [
|
|
19
|
-
"browser",
|
|
20
|
-
"isarray",
|
|
21
|
-
"array"
|
|
22
|
-
],
|
|
23
|
-
"author": {
|
|
24
|
-
"name": "Julian Gruber",
|
|
25
|
-
"email": "mail@juliangruber.com",
|
|
26
|
-
"url": "http://juliangruber.com"
|
|
27
|
-
},
|
|
28
|
-
"license": "MIT",
|
|
29
|
-
"testling": {
|
|
30
|
-
"files": "test.js",
|
|
31
|
-
"browsers": [
|
|
32
|
-
"ie/8..latest",
|
|
33
|
-
"firefox/17..latest",
|
|
34
|
-
"firefox/nightly",
|
|
35
|
-
"chrome/22..latest",
|
|
36
|
-
"chrome/canary",
|
|
37
|
-
"opera/12..latest",
|
|
38
|
-
"opera/next",
|
|
39
|
-
"safari/5.1..latest",
|
|
40
|
-
"ipad/6.0..latest",
|
|
41
|
-
"iphone/6.0..latest",
|
|
42
|
-
"android-browser/4.2..latest"
|
|
43
|
-
]
|
|
44
|
-
},
|
|
45
|
-
"scripts": {
|
|
46
|
-
"test": "tape test.js"
|
|
47
|
-
}
|
|
48
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"root": true,
|
|
3
|
-
|
|
4
|
-
"extends": "@ljharb",
|
|
5
|
-
|
|
6
|
-
"rules": {
|
|
7
|
-
"consistent-return": 1,
|
|
8
|
-
"max-len": 0,
|
|
9
|
-
"max-lines-per-function": 0,
|
|
10
|
-
"max-params": 1,
|
|
11
|
-
"max-statements-per-line": [2, { "max": 2 }],
|
|
12
|
-
"no-continue": 1,
|
|
13
|
-
"no-negated-condition": 1,
|
|
14
|
-
"no-param-reassign": 1,
|
|
15
|
-
"no-redeclare": 1,
|
|
16
|
-
"no-restricted-syntax": 1,
|
|
17
|
-
"object-curly-newline": 0,
|
|
18
|
-
"max-statements": 1,
|
|
19
|
-
"operator-linebreak": 0,
|
|
20
|
-
"sort-keys": 1,
|
|
21
|
-
},
|
|
22
|
-
|
|
23
|
-
"overrides": [
|
|
24
|
-
{
|
|
25
|
-
"files": "example/**",
|
|
26
|
-
"rules": {
|
|
27
|
-
"no-console": 0,
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
],
|
|
31
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
# These are supported funding model platforms
|
|
2
|
-
|
|
3
|
-
github: [ljharb]
|
|
4
|
-
patreon: # Replace with a single Patreon username
|
|
5
|
-
open_collective: # Replace with a single Open Collective username
|
|
6
|
-
ko_fi: # Replace with a single Ko-fi username
|
|
7
|
-
tidelift: npm/json-stable-stringify
|
|
8
|
-
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
|
9
|
-
liberapay: # Replace with a single Liberapay username
|
|
10
|
-
issuehunt: # Replace with a single IssueHunt username
|
|
11
|
-
otechie: # Replace with a single Otechie username
|
|
12
|
-
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
|
|
5
|
-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
|
6
|
-
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
-
|
|
8
|
-
## [v1.3.0](https://github.com/ljharb/json-stable-stringify/compare/v1.2.1...v1.3.0) - 2025-04-21
|
|
9
|
-
|
|
10
|
-
### Fixed
|
|
11
|
-
|
|
12
|
-
- [New] add `collapseEmpty` option [`#15`](https://github.com/ljharb/json-stable-stringify/issues/15)
|
|
13
|
-
|
|
14
|
-
### Commits
|
|
15
|
-
|
|
16
|
-
- [Dev Deps] update `@arethetypeswrong/cli`, `@ljharb/tsconfig`, `@types/tape` [`1ac9c16`](https://github.com/ljharb/json-stable-stringify/commit/1ac9c164666d4f70b216de0a7bb142ced5de2995)
|
|
17
|
-
- [Deps] update `call-bound` [`729fcba`](https://github.com/ljharb/json-stable-stringify/commit/729fcba5d6f6b3b8599cc22e434272defc0a237f)
|
|
18
|
-
|
|
19
|
-
## [v1.2.1](https://github.com/ljharb/json-stable-stringify/compare/v1.2.0...v1.2.1) - 2024-12-21
|
|
20
|
-
|
|
21
|
-
### Commits
|
|
22
|
-
|
|
23
|
-
- [types] input is unknown, can be non object [`7135fba`](https://github.com/ljharb/json-stable-stringify/commit/7135fba3f03c6f97d801047c53fab90c26aacfa8)
|
|
24
|
-
- [Dev Deps] update `@arethetypeswrong/cli`, `@types/tape` [`504a644`](https://github.com/ljharb/json-stable-stringify/commit/504a6442880d45ae2548b309a9f5cf0b488176db)
|
|
25
|
-
|
|
26
|
-
## [v1.2.0](https://github.com/ljharb/json-stable-stringify/compare/v1.1.1...v1.2.0) - 2024-12-17
|
|
27
|
-
|
|
28
|
-
### Fixed
|
|
29
|
-
|
|
30
|
-
- [readme] remove dead badges [`#14`](https://github.com/ljharb/json-stable-stringify/issues/14)
|
|
31
|
-
|
|
32
|
-
### Commits
|
|
33
|
-
|
|
34
|
-
- [New] add types [`5dbd6c8`](https://github.com/ljharb/json-stable-stringify/commit/5dbd6c802fe013082e597ecf6a8c3428e60d906b)
|
|
35
|
-
- [eslint] clean up formatting [`21e95e5`](https://github.com/ljharb/json-stable-stringify/commit/21e95e57ea55c6b7e8c63835391b1791a8ed9323)
|
|
36
|
-
- [meta] sort package.json [`a9f44d5`](https://github.com/ljharb/json-stable-stringify/commit/a9f44d5e532e93e7cc48e384472c0a9da189bab9)
|
|
37
|
-
- [actions] split out node 10-20, and 20+ [`74551e4`](https://github.com/ljharb/json-stable-stringify/commit/74551e4cc76ae90880b0471365de47d1c3dd1379)
|
|
38
|
-
- [Tests] add test coverage for options provided directly on a cmp function [`0a50205`](https://github.com/ljharb/json-stable-stringify/commit/0a502052b9191f53f072599aac61aa829ac9e0ae)
|
|
39
|
-
- [Robustness] cache more builtins [`d390c99`](https://github.com/ljharb/json-stable-stringify/commit/d390c99889ec80a20b77a9f73d8d8134f0fc11b8)
|
|
40
|
-
- [Dev Deps] update `@ljharb/eslint-config`, `auto-changelog`, `tape` [`03686a0`](https://github.com/ljharb/json-stable-stringify/commit/03686a0af26444bac661e8ca0e70e3d13a4938d0)
|
|
41
|
-
- [Tests] key ordering is reversed in node 11+ [`7034a17`](https://github.com/ljharb/json-stable-stringify/commit/7034a176d0dde8df1f899bf0f1c44e73f5792947)
|
|
42
|
-
- [Dev Deps] update `npmignore`, `tape` [`ba8d519`](https://github.com/ljharb/json-stable-stringify/commit/ba8d519505f59725c9f4b0451332f6d64801a910)
|
|
43
|
-
- [Refactor] use `call-bound` directly [`850b24c`](https://github.com/ljharb/json-stable-stringify/commit/850b24c5b3dc69b59804637c92c10f7bb3277ab8)
|
|
44
|
-
- [Tests] replace `aud` with `npm audit` [`22fb720`](https://github.com/ljharb/json-stable-stringify/commit/22fb72061005f9b124a0dc84f8b87c3a977c00bd)
|
|
45
|
-
- [Deps] update `call-bind` [`adc30b0`](https://github.com/ljharb/json-stable-stringify/commit/adc30b0746b58d469492e7586b1d32469dce4783)
|
|
46
|
-
- [Deps] update `call-bind` [`a280582`](https://github.com/ljharb/json-stable-stringify/commit/a280582e6b8bb6e04642010931b60f9fda2fa0df)
|
|
47
|
-
- [Dev Deps] add missing peer dep [`3bb517c`](https://github.com/ljharb/json-stable-stringify/commit/3bb517cc179cd90e841581046791d24cc2bee66a)
|
|
48
|
-
|
|
49
|
-
## [v1.1.1](https://github.com/ljharb/json-stable-stringify/compare/v1.1.0...v1.1.1) - 2024-01-16
|
|
50
|
-
|
|
51
|
-
### Fixed
|
|
52
|
-
|
|
53
|
-
- [Performance] use an array join instead of a string. [`#9`](https://github.com/ljharb/json-stable-stringify/issues/9)
|
|
54
|
-
|
|
55
|
-
### Commits
|
|
56
|
-
|
|
57
|
-
- [readme] replaced var with const [`e22d419`](https://github.com/ljharb/json-stable-stringify/commit/e22d419b54d8fd1dc36aa18b685da0032c74ec0f)
|
|
58
|
-
- [Dev Deps] update `aud`, `tape` [`dc26af2`](https://github.com/ljharb/json-stable-stringify/commit/dc26af2cac5caa4e9ecb72f384c3c652aa612457)
|
|
59
|
-
|
|
60
|
-
## [v1.1.0](https://github.com/ljharb/json-stable-stringify/compare/v1.0.2...v1.1.0) - 2023-11-13
|
|
61
|
-
|
|
62
|
-
### Commits
|
|
63
|
-
|
|
64
|
-
- [New] `opts.cmp`: add `get` function [`1b11748`](https://github.com/ljharb/json-stable-stringify/commit/1b117480abdfe8d2a29d3ce9fefc46d7181ba2fa)
|
|
65
|
-
- [meta] update license text so GitHub can identify it [`fd520e1`](https://github.com/ljharb/json-stable-stringify/commit/fd520e17af7121e2d8e678fe7c296c2b617b0b74)
|
|
66
|
-
- [Refactor] use `isarray`, `object-keys` instead of homegrown attempts [`d1d2038`](https://github.com/ljharb/json-stable-stringify/commit/d1d20388f579d6a92fce70fbd00a0af36bd8d097)
|
|
67
|
-
- [Refactor] build up a string instead of an array + join [`6c066b8`](https://github.com/ljharb/json-stable-stringify/commit/6c066b82708eb7e7ca0ca7f89737df48aa534a6c)
|
|
68
|
-
- [Refactor] avoid an IIFE [`8243ea1`](https://github.com/ljharb/json-stable-stringify/commit/8243ea1a4c780c126b8800334b398e1c5e2ed9f9)
|
|
69
|
-
- [Perf] avoid creating an options object when not needed [`02f0778`](https://github.com/ljharb/json-stable-stringify/commit/02f0778989960dfd46781b231fa3d06e9519befa)
|
|
70
|
-
- [Refactor] avoid `new Array` [`80d52a1`](https://github.com/ljharb/json-stable-stringify/commit/80d52a197d8e695a6b949c9839136b72606d7bf1)
|
|
71
|
-
- [Robustness] use `call-bind` to invoke replacer [`c52438f`](https://github.com/ljharb/json-stable-stringify/commit/c52438fe222554b3f138cebbeac55844b5614451)
|
|
72
|
-
- [Robustness] cache `JSON.stringify` at module load [`616dec3`](https://github.com/ljharb/json-stable-stringify/commit/616dec38c80db6f94cdf9c2bcc175f9e7d8bc570)
|
|
73
|
-
- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`494a3ce`](https://github.com/ljharb/json-stable-stringify/commit/494a3ce7cc1fd2aa56981af68c037c802979378e)
|
|
74
|
-
- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`861ea7d`](https://github.com/ljharb/json-stable-stringify/commit/861ea7d38700ee3a50721c4299f4e967394129d7)
|
|
75
|
-
- [Refactor] avoid recreating default replacer [`4e95ebb`](https://github.com/ljharb/json-stable-stringify/commit/4e95ebb69e17b5e40af9be363c3216b1fcb91517)
|
|
76
|
-
- [Tests] remove unused travis.yml [`1226971`](https://github.com/ljharb/json-stable-stringify/commit/12269716dd570af4cb21e87bf9156911e1c6b82b)
|
|
77
|
-
- [meta] add missing `engines.node` [`7a80ff6`](https://github.com/ljharb/json-stable-stringify/commit/7a80ff6a9ba24801f58f1d1175b6527accdf9cd0)
|
|
78
|
-
|
|
79
|
-
## [v1.0.2](https://github.com/ljharb/json-stable-stringify/compare/v1.0.1...v1.0.2) - 2022-11-07
|
|
80
|
-
|
|
81
|
-
### Commits
|
|
82
|
-
|
|
83
|
-
- [eslint] fix indentation and whitespace [`c97e78c`](https://github.com/ljharb/json-stable-stringify/commit/c97e78cf3c0695701095dc0036681182585a6392)
|
|
84
|
-
- [eslint] more cleanup [`c162117`](https://github.com/ljharb/json-stable-stringify/commit/c162117489c6dc63ece402b4a9b6e566f109fa65)
|
|
85
|
-
- [meta] add `auto-changelog` [`83934ff`](https://github.com/ljharb/json-stable-stringify/commit/83934ffbbb3e72b9da09bf6436e1f86e7dce3b74)
|
|
86
|
-
- [actions] add reusable workflows [`7b24830`](https://github.com/ljharb/json-stable-stringify/commit/7b248309f6ba87e2e52f99485c1f8b209b5788dc)
|
|
87
|
-
- [readme] rename, add badges [`5433588`](https://github.com/ljharb/json-stable-stringify/commit/5433588781ebd98e41c81b5bfed1fb67520cf171)
|
|
88
|
-
- [eslint] add eslint [`7be6c27`](https://github.com/ljharb/json-stable-stringify/commit/7be6c2755a7e2ead43017761b248a21511e457a0)
|
|
89
|
-
- [meta] create FUNDING.yml; add `funding` in package.json [`6edbece`](https://github.com/ljharb/json-stable-stringify/commit/6edbece874fb656b9957b7bb362cf492f95fe259)
|
|
90
|
-
- [meta] use `npmignore` to autogenerate an npmignore file [`b5d7d3a`](https://github.com/ljharb/json-stable-stringify/commit/b5d7d3abbe3d3a653e9ed511ab1b48940c5eb126)
|
|
91
|
-
- [Dev Deps] update `tape` [`2200cf1`](https://github.com/ljharb/json-stable-stringify/commit/2200cf1e5822a4dd928541c3122a0922703c951f)
|
|
92
|
-
- [actions] update rebase action [`e41ac00`](https://github.com/ljharb/json-stable-stringify/commit/e41ac000fb633d3df7c1e417ffd6213d885b64a1)
|
|
93
|
-
- [meta] update URLs [`f17e490`](https://github.com/ljharb/json-stable-stringify/commit/f17e49038cf39a84a8a2677cc6445fad54902766)
|
|
94
|
-
- Only apps should have lockfiles [`4f052f4`](https://github.com/ljharb/json-stable-stringify/commit/4f052f4ebf722024bc3827064b2d823f405ff2f6)
|
|
95
|
-
- add breaking test (acyclic detected as cyclic) [`7f5f443`](https://github.com/ljharb/json-stable-stringify/commit/7f5f443e90402a520f1413833318b02bbb11ad67)
|
|
96
|
-
- [meta] add `safe-publish-latest` [`ddb843f`](https://github.com/ljharb/json-stable-stringify/commit/ddb843f678bfe5145afaf03d811701c5ce4a17a6)
|
|
97
|
-
- [Tests] add `aud` in `posttest` [`245c9bf`](https://github.com/ljharb/json-stable-stringify/commit/245c9bfa291d6d33813d44941d7639494fa8579a)
|
|
98
|
-
- [Deps] update `jsonify` [`7b79a68`](https://github.com/ljharb/json-stable-stringify/commit/7b79a686f1ccda88b3ab20549840764c9b6f74eb)
|
|
99
|
-
- fix conflict [`e43ca2a`](https://github.com/ljharb/json-stable-stringify/commit/e43ca2a1dcfc39bf1514684492767ef6040d1f3e)
|
|
100
|
-
|
|
101
|
-
## [v1.0.1](https://github.com/ljharb/json-stable-stringify/compare/v1.0.0...v1.0.1) - 2016-02-02
|
|
102
|
-
|
|
103
|
-
### Commits
|
|
104
|
-
|
|
105
|
-
- Correctly stringify non-cyclic shared references [`c26c700`](https://github.com/ljharb/json-stable-stringify/commit/c26c700f0b1d078512d2eba0eb16d6e5110a5538)
|
|
106
|
-
|
|
107
|
-
## [v1.0.0](https://github.com/ljharb/json-stable-stringify/compare/v0.1.3...v1.0.0) - 2014-05-27
|
|
108
|
-
|
|
109
|
-
### Commits
|
|
110
|
-
|
|
111
|
-
- Added options.replacer for custom object serialization [`ccf5e63`](https://github.com/ljharb/json-stable-stringify/commit/ccf5e636803a55d062e97aaf4e2c27d5c787aff0)
|
|
112
|
-
- document replacer [`894f43b`](https://github.com/ljharb/json-stable-stringify/commit/894f43b633724bf0c6c2741143addfe20e149015)
|
|
113
|
-
|
|
114
|
-
## [v0.1.3](https://github.com/ljharb/json-stable-stringify/compare/v0.1.2...v0.1.3) - 2014-05-27
|
|
115
|
-
|
|
116
|
-
### Commits
|
|
117
|
-
|
|
118
|
-
- Enable toJSON function to return different types [`de0debf`](https://github.com/ljharb/json-stable-stringify/commit/de0debff3a36604010279af1868c6172674f9cc9)
|
|
119
|
-
|
|
120
|
-
## [v0.1.2](https://github.com/ljharb/json-stable-stringify/compare/v0.1.1...v0.1.2) - 2014-04-02
|
|
121
|
-
|
|
122
|
-
### Commits
|
|
123
|
-
|
|
124
|
-
- Should call 'toJSON' if it is defined on the object being stringified. [`c1de9d1`](https://github.com/ljharb/json-stable-stringify/commit/c1de9d193e8d6755d6ea2c2e5ead0544a8122040)
|
|
125
|
-
- guard the reference [`a723f70`](https://github.com/ljharb/json-stable-stringify/commit/a723f705dd13fcbab1aa0ffa51849395712aaa13)
|
|
126
|
-
- reindent [`7ff314f`](https://github.com/ljharb/json-stable-stringify/commit/7ff314fabf3b40074a4aff906b16e087897c6040)
|
|
127
|
-
|
|
128
|
-
## [v0.1.1](https://github.com/ljharb/json-stable-stringify/compare/v0.1.0...v0.1.1) - 2013-12-21
|
|
129
|
-
|
|
130
|
-
### Commits
|
|
131
|
-
|
|
132
|
-
- fixed merge conflicts [`7e139e8`](https://github.com/ljharb/json-stable-stringify/commit/7e139e8bbeb37b4dfd44991f4d6c98bba446b949)
|
|
133
|
-
- fix formatting [`b5df6b9`](https://github.com/ljharb/json-stable-stringify/commit/b5df6b9ec0f5a5826eebb5d93424923041e43405)
|
|
134
|
-
|
|
135
|
-
## [v0.1.0](https://github.com/ljharb/json-stable-stringify/compare/v0.0.1...v0.1.0) - 2013-12-21
|
|
136
|
-
|
|
137
|
-
### Commits
|
|
138
|
-
|
|
139
|
-
- New “space” option to enable pretty printing (same as ES5) [`e6815c9`](https://github.com/ljharb/json-stable-stringify/commit/e6815c9dd8ca4052023d2bbd5c5b78b44f0efef0)
|
|
140
|
-
- formatting [`962edf4`](https://github.com/ljharb/json-stable-stringify/commit/962edf4abb96189546b4f78f8719d747fd90fd43)
|
|
141
|
-
|
|
142
|
-
## [v0.0.1](https://github.com/ljharb/json-stable-stringify/compare/v0.0.0...v0.0.1) - 2013-07-17
|
|
143
|
-
|
|
144
|
-
### Commits
|
|
145
|
-
|
|
146
|
-
- don't choke on null [`3f4e9c7`](https://github.com/ljharb/json-stable-stringify/commit/3f4e9c78befc32f7d36af68e408e25cdc84be202)
|
|
147
|
-
|
|
148
|
-
## v0.0.0 - 2013-07-17
|
|
149
|
-
|
|
150
|
-
### Commits
|
|
151
|
-
|
|
152
|
-
- docs, more examples [`81f36c1`](https://github.com/ljharb/json-stable-stringify/commit/81f36c1aa645a75ebefa6d66d9cf41660439ebfe)
|
|
153
|
-
- package.json etc [`98c5fd6`](https://github.com/ljharb/json-stable-stringify/commit/98c5fd6f9b12e1679b90777b9f6384203a05e983)
|
|
154
|
-
- working implementation with 2 examples [`3e5363a`](https://github.com/ljharb/json-stable-stringify/commit/3e5363ac542fa3bf0bdef51034ca9201648f9839)
|
|
155
|
-
- turn examples into tests, everything passes [`cccbd24`](https://github.com/ljharb/json-stable-stringify/commit/cccbd24c1a1a6318e3c004c86ae032db98a9abf8)
|
|
156
|
-
- badges [`f8ff127`](https://github.com/ljharb/json-stable-stringify/commit/f8ff127df9f05d0b238bae8f91e483a755e0069e)
|
|
157
|
-
- comparison test now passes [`8ab93e2`](https://github.com/ljharb/json-stable-stringify/commit/8ab93e2273ec530990e28233fcb96fde548ab16c)
|
|
158
|
-
- failing custom comparison test [`3af627d`](https://github.com/ljharb/json-stable-stringify/commit/3af627d0d367451a98fc9cec6580760ade8f9bae)
|
|
159
|
-
- fix object.keys shim [`7c16662`](https://github.com/ljharb/json-stable-stringify/commit/7c16662bc1cc6ecfa64159f9277e067cb1bec505)
|
|
160
|
-
- fix for the other tests that don't use a cmp function [`f7b9a47`](https://github.com/ljharb/json-stable-stringify/commit/f7b9a476fd3ce9ec09b2c0588605e6c7c053e9ed)
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2013 contributors
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
# json-stable-stringify <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
|
|
2
|
-
|
|
3
|
-
[![github actions][actions-image]][actions-url]
|
|
4
|
-
[![coverage][codecov-image]][codecov-url]
|
|
5
|
-
[![License][license-image]][license-url]
|
|
6
|
-
[![Downloads][downloads-image]][downloads-url]
|
|
7
|
-
|
|
8
|
-
[![npm badge][npm-badge-png]][package-url]
|
|
9
|
-
|
|
10
|
-
deterministic version of `JSON.stringify()` so you can get a consistent hash from stringified results
|
|
11
|
-
|
|
12
|
-
You can also pass in a custom comparison function.
|
|
13
|
-
|
|
14
|
-
# example
|
|
15
|
-
|
|
16
|
-
``` js
|
|
17
|
-
const stringify = require('json-stable-stringify');
|
|
18
|
-
|
|
19
|
-
const obj = { c: 8, b: [{ z: 6, y: 5, x: 4 }, 7], a: 3 };
|
|
20
|
-
|
|
21
|
-
console.log(stringify(obj));
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
output:
|
|
25
|
-
|
|
26
|
-
```
|
|
27
|
-
{"a":3,"b":[{"x":4,"y":5,"z":6},7],"c":8}
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
# methods
|
|
31
|
-
|
|
32
|
-
``` js
|
|
33
|
-
const stringify = require('json-stable-stringify')
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
<a id="var-str--stringifyobj-opts"></a>
|
|
37
|
-
## const str = stringify(obj, opts)
|
|
38
|
-
|
|
39
|
-
Return a deterministic stringified string `str` from the object `obj`.
|
|
40
|
-
|
|
41
|
-
## options
|
|
42
|
-
|
|
43
|
-
### cmp
|
|
44
|
-
|
|
45
|
-
If `opts` is given, you can supply an `opts.cmp` to have a custom comparison function for object keys.
|
|
46
|
-
Your function `opts.cmp` is called with these parameters:
|
|
47
|
-
|
|
48
|
-
``` js
|
|
49
|
-
opts.cmp({ key: akey, value: avalue }, { key: bkey, value: bvalue }, { get(key): value })
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
For example, to sort on the object key names in reverse order you could write:
|
|
53
|
-
|
|
54
|
-
``` js
|
|
55
|
-
const stringify = require('json-stable-stringify');
|
|
56
|
-
|
|
57
|
-
const obj = { c: 8, b: [{ z: 6, y: 5, x: 4 },7], a: 3 };
|
|
58
|
-
|
|
59
|
-
const s = stringify(obj, function (a, b) {
|
|
60
|
-
return b.key.localeCompare(a.key);
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
console.log(s);
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
which results in the output string:
|
|
67
|
-
|
|
68
|
-
``` js
|
|
69
|
-
{"c":8,"b":[{"z":6,"y":5,"x":4},7],"a":3}
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
Or if you wanted to sort on the object values in reverse order, you could write:
|
|
73
|
-
|
|
74
|
-
``` js
|
|
75
|
-
const stringify = require('json-stable-stringify');
|
|
76
|
-
|
|
77
|
-
const obj = { d: 6, c: 5, b: [{ z: 3, y: 2, x: 1 }, 9], a: 10 };
|
|
78
|
-
|
|
79
|
-
const s = stringify(obj, function (a, b) {
|
|
80
|
-
return a.value < b.value ? 1 : -1;
|
|
81
|
-
});
|
|
82
|
-
|
|
83
|
-
console.log(s);
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
which outputs:
|
|
87
|
-
|
|
88
|
-
``` js
|
|
89
|
-
{"d":6,"c":5,"b":[{"z":3,"y":2,"x":1},9],"a":10}
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
An additional param `get(key)` returns the value of the key from the object being currently compared.
|
|
93
|
-
|
|
94
|
-
### space
|
|
95
|
-
|
|
96
|
-
If you specify `opts.space`, it will indent the output for pretty-printing.
|
|
97
|
-
Valid values are strings (e.g. `{space: \t}`) or a number of spaces
|
|
98
|
-
(`{space: 3}`).
|
|
99
|
-
|
|
100
|
-
For example:
|
|
101
|
-
|
|
102
|
-
```js
|
|
103
|
-
const obj = { b: 1, a: { foo: 'bar', and: [1, 2, 3] } };
|
|
104
|
-
|
|
105
|
-
const s = stringify(obj, { space: ' ' });
|
|
106
|
-
|
|
107
|
-
console.log(s);
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
which outputs:
|
|
111
|
-
|
|
112
|
-
```
|
|
113
|
-
{
|
|
114
|
-
"a": {
|
|
115
|
-
"and": [
|
|
116
|
-
1,
|
|
117
|
-
2,
|
|
118
|
-
3
|
|
119
|
-
],
|
|
120
|
-
"foo": "bar"
|
|
121
|
-
},
|
|
122
|
-
"b": 1
|
|
123
|
-
}
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
### replacer
|
|
127
|
-
|
|
128
|
-
The replacer parameter is a function `opts.replacer(key, value)` that behaves the same as the replacer
|
|
129
|
-
[from the core JSON object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_native_JSON#The_replacer_parameter).
|
|
130
|
-
|
|
131
|
-
# install
|
|
132
|
-
|
|
133
|
-
With [npm](https://npmjs.org) do:
|
|
134
|
-
|
|
135
|
-
```
|
|
136
|
-
npm install json-stable-stringify
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
# license
|
|
140
|
-
|
|
141
|
-
MIT
|
|
142
|
-
|
|
143
|
-
[package-url]: https://npmjs.org/package/json-stable-stringify
|
|
144
|
-
[npm-version-svg]: https://versionbadg.es/ljharb/json-stable-stringify.svg
|
|
145
|
-
[deps-svg]: https://david-dm.org/ljharb/json-stable-stringify.svg
|
|
146
|
-
[deps-url]: https://david-dm.org/ljharb/json-stable-stringify
|
|
147
|
-
[dev-deps-svg]: https://david-dm.org/ljharb/json-stable-stringify/dev-status.svg
|
|
148
|
-
[dev-deps-url]: https://david-dm.org/ljharb/json-stable-stringify#info=devDependencies
|
|
149
|
-
[npm-badge-png]: https://nodei.co/npm/json-stable-stringify.png?downloads=true&stars=true
|
|
150
|
-
[license-image]: https://img.shields.io/npm/l/json-stable-stringify.svg
|
|
151
|
-
[license-url]: LICENSE
|
|
152
|
-
[downloads-image]: https://img.shields.io/npm/dm/json-stable-stringify.svg
|
|
153
|
-
[downloads-url]: https://npm-stat.com/charts.html?package=json-stable-stringify
|
|
154
|
-
[codecov-image]: https://codecov.io/gh/ljharb/json-stable-stringify/branch/main/graphs/badge.svg
|
|
155
|
-
[codecov-url]: https://app.codecov.io/gh/ljharb/json-stable-stringify/
|
|
156
|
-
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/json-stable-stringify
|
|
157
|
-
[actions-url]: https://github.com/ljharb/json-stable-stringify/actions
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var stringify = require('../');
|
|
4
|
-
|
|
5
|
-
var obj = { d: 6, c: 5, b: [{ z: 3, y: 2, x: 1 }, 9], a: 10 };
|
|
6
|
-
|
|
7
|
-
var s = stringify(obj, /** @type {import('..').Comparator} */ function (a, b) {
|
|
8
|
-
// @ts-expect-error implicit coercion here is fine
|
|
9
|
-
return a.value < b.value ? 1 : -1;
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
console.log(s);
|