step-node-agent 3.26.5 → 3.27.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.
Files changed (259) hide show
  1. package/node_modules/call-bind-apply-helpers/.eslintrc +1 -0
  2. package/node_modules/call-bind-apply-helpers/CHANGELOG.md +7 -0
  3. package/node_modules/call-bind-apply-helpers/index.d.ts +38 -20
  4. package/node_modules/call-bind-apply-helpers/index.js +1 -1
  5. package/node_modules/call-bind-apply-helpers/package.json +8 -8
  6. package/node_modules/call-bind-apply-helpers/test/index.js +4 -4
  7. package/node_modules/{call-bind → call-bound}/.eslintrc +0 -3
  8. package/node_modules/{define-data-property → call-bound}/.github/FUNDING.yml +1 -1
  9. package/node_modules/call-bound/CHANGELOG.md +42 -0
  10. package/node_modules/{call-bind → call-bound}/LICENSE +1 -1
  11. package/node_modules/call-bound/README.md +53 -0
  12. package/node_modules/call-bound/index.d.ts +94 -0
  13. package/node_modules/call-bound/index.js +19 -0
  14. package/node_modules/{call-bind → call-bound}/package.json +23 -17
  15. package/node_modules/{call-bind/test/callBound.js → call-bound/test/index.js} +12 -5
  16. package/node_modules/call-bound/tsconfig.json +10 -0
  17. package/node_modules/dunder-proto/CHANGELOG.md +9 -0
  18. package/node_modules/dunder-proto/get.js +10 -3
  19. package/node_modules/dunder-proto/package.json +4 -4
  20. package/node_modules/dunder-proto/set.js +7 -1
  21. package/node_modules/dunder-proto/test/set.js +10 -1
  22. package/node_modules/es-object-atoms/.eslintrc +16 -0
  23. package/node_modules/{set-function-length → es-object-atoms}/.github/FUNDING.yml +1 -1
  24. package/node_modules/es-object-atoms/CHANGELOG.md +37 -0
  25. package/node_modules/{has-property-descriptors → es-object-atoms}/LICENSE +1 -1
  26. package/node_modules/es-object-atoms/README.md +63 -0
  27. package/node_modules/es-object-atoms/RequireObjectCoercible.d.ts +3 -0
  28. package/node_modules/es-object-atoms/RequireObjectCoercible.js +11 -0
  29. package/node_modules/es-object-atoms/ToObject.d.ts +7 -0
  30. package/node_modules/es-object-atoms/ToObject.js +10 -0
  31. package/node_modules/es-object-atoms/index.d.ts +3 -0
  32. package/node_modules/es-object-atoms/index.js +4 -0
  33. package/node_modules/es-object-atoms/isObject.d.ts +3 -0
  34. package/node_modules/es-object-atoms/isObject.js +6 -0
  35. package/node_modules/es-object-atoms/package.json +80 -0
  36. package/node_modules/es-object-atoms/test/index.js +38 -0
  37. package/node_modules/es-object-atoms/tsconfig.json +6 -0
  38. package/node_modules/get-intrinsic/.eslintrc +4 -0
  39. package/node_modules/get-intrinsic/CHANGELOG.md +25 -0
  40. package/node_modules/get-intrinsic/index.js +25 -6
  41. package/node_modules/get-intrinsic/package.json +11 -9
  42. package/node_modules/get-proto/.eslintrc +10 -0
  43. package/node_modules/{call-bind → get-proto}/.github/FUNDING.yml +1 -1
  44. package/node_modules/get-proto/CHANGELOG.md +21 -0
  45. package/node_modules/{define-data-property → get-proto}/LICENSE +1 -1
  46. package/node_modules/get-proto/Object.getPrototypeOf.d.ts +5 -0
  47. package/node_modules/get-proto/Object.getPrototypeOf.js +6 -0
  48. package/node_modules/get-proto/README.md +50 -0
  49. package/node_modules/get-proto/Reflect.getPrototypeOf.d.ts +3 -0
  50. package/node_modules/get-proto/Reflect.getPrototypeOf.js +4 -0
  51. package/node_modules/get-proto/index.d.ts +5 -0
  52. package/node_modules/get-proto/index.js +27 -0
  53. package/node_modules/{has-property-descriptors → get-proto}/package.json +35 -31
  54. package/node_modules/get-proto/test/index.js +68 -0
  55. package/node_modules/get-proto/tsconfig.json +9 -0
  56. package/node_modules/is-core-module/CHANGELOG.md +13 -0
  57. package/node_modules/is-core-module/core.json +1 -0
  58. package/node_modules/is-core-module/package.json +3 -3
  59. package/node_modules/is-core-module/test/index.js +3 -0
  60. package/node_modules/math-intrinsics/.eslintrc +16 -0
  61. package/node_modules/math-intrinsics/.github/FUNDING.yml +12 -0
  62. package/node_modules/math-intrinsics/CHANGELOG.md +24 -0
  63. package/node_modules/{set-function-length → math-intrinsics}/LICENSE +1 -1
  64. package/node_modules/math-intrinsics/README.md +50 -0
  65. package/node_modules/math-intrinsics/abs.d.ts +1 -0
  66. package/node_modules/math-intrinsics/abs.js +4 -0
  67. package/node_modules/math-intrinsics/constants/maxArrayLength.d.ts +3 -0
  68. package/node_modules/math-intrinsics/constants/maxArrayLength.js +4 -0
  69. package/node_modules/math-intrinsics/constants/maxSafeInteger.d.ts +3 -0
  70. package/node_modules/math-intrinsics/constants/maxSafeInteger.js +5 -0
  71. package/node_modules/math-intrinsics/constants/maxValue.d.ts +3 -0
  72. package/node_modules/math-intrinsics/constants/maxValue.js +5 -0
  73. package/node_modules/math-intrinsics/floor.d.ts +1 -0
  74. package/node_modules/math-intrinsics/floor.js +4 -0
  75. package/node_modules/math-intrinsics/isFinite.d.ts +3 -0
  76. package/node_modules/math-intrinsics/isFinite.js +12 -0
  77. package/node_modules/math-intrinsics/isInteger.d.ts +3 -0
  78. package/node_modules/math-intrinsics/isInteger.js +16 -0
  79. package/node_modules/math-intrinsics/isNaN.d.ts +1 -0
  80. package/node_modules/math-intrinsics/isNaN.js +6 -0
  81. package/node_modules/math-intrinsics/isNegativeZero.d.ts +3 -0
  82. package/node_modules/math-intrinsics/isNegativeZero.js +6 -0
  83. package/node_modules/math-intrinsics/max.d.ts +1 -0
  84. package/node_modules/math-intrinsics/max.js +4 -0
  85. package/node_modules/math-intrinsics/min.d.ts +1 -0
  86. package/node_modules/math-intrinsics/min.js +4 -0
  87. package/node_modules/math-intrinsics/mod.d.ts +3 -0
  88. package/node_modules/math-intrinsics/mod.js +9 -0
  89. package/node_modules/math-intrinsics/package.json +86 -0
  90. package/node_modules/math-intrinsics/pow.d.ts +1 -0
  91. package/node_modules/math-intrinsics/pow.js +4 -0
  92. package/node_modules/math-intrinsics/round.d.ts +1 -0
  93. package/node_modules/math-intrinsics/round.js +4 -0
  94. package/node_modules/math-intrinsics/sign.d.ts +3 -0
  95. package/node_modules/math-intrinsics/sign.js +11 -0
  96. package/node_modules/math-intrinsics/test/index.js +192 -0
  97. package/node_modules/math-intrinsics/tsconfig.json +3 -0
  98. package/node_modules/object-inspect/CHANGELOG.md +8 -0
  99. package/node_modules/object-inspect/index.js +10 -7
  100. package/node_modules/object-inspect/package.json +5 -4
  101. package/node_modules/object-inspect/test/values.js +50 -0
  102. package/node_modules/resolve/lib/core.json +4 -0
  103. package/node_modules/resolve/package.json +12 -9
  104. package/node_modules/side-channel/.eslintrc +1 -0
  105. package/node_modules/side-channel/CHANGELOG.md +15 -0
  106. package/node_modules/side-channel/README.md +60 -1
  107. package/node_modules/side-channel/index.d.ts +9 -22
  108. package/node_modules/side-channel/index.js +20 -106
  109. package/node_modules/side-channel/package.json +20 -19
  110. package/node_modules/side-channel/test/index.js +76 -55
  111. package/node_modules/side-channel/tsconfig.json +2 -43
  112. package/node_modules/side-channel-list/.editorconfig +9 -0
  113. package/node_modules/side-channel-list/.eslintrc +11 -0
  114. package/node_modules/{has-property-descriptors → side-channel-list}/.github/FUNDING.yml +1 -1
  115. package/node_modules/side-channel-list/CHANGELOG.md +15 -0
  116. package/node_modules/side-channel-list/LICENSE +21 -0
  117. package/node_modules/side-channel-list/README.md +62 -0
  118. package/node_modules/side-channel-list/index.d.ts +13 -0
  119. package/node_modules/side-channel-list/index.js +113 -0
  120. package/node_modules/side-channel-list/list.d.ts +14 -0
  121. package/node_modules/side-channel-list/package.json +77 -0
  122. package/node_modules/side-channel-list/test/index.js +104 -0
  123. package/node_modules/side-channel-map/.editorconfig +9 -0
  124. package/node_modules/side-channel-map/.eslintrc +11 -0
  125. package/node_modules/side-channel-map/.github/FUNDING.yml +12 -0
  126. package/node_modules/side-channel-map/CHANGELOG.md +22 -0
  127. package/node_modules/side-channel-map/LICENSE +21 -0
  128. package/node_modules/side-channel-map/README.md +62 -0
  129. package/node_modules/side-channel-map/index.d.ts +15 -0
  130. package/node_modules/side-channel-map/index.js +68 -0
  131. package/node_modules/side-channel-map/package.json +80 -0
  132. package/node_modules/side-channel-map/test/index.js +114 -0
  133. package/node_modules/side-channel-map/tsconfig.json +9 -0
  134. package/node_modules/side-channel-weakmap/.editorconfig +9 -0
  135. package/node_modules/side-channel-weakmap/.eslintrc +12 -0
  136. package/node_modules/side-channel-weakmap/.github/FUNDING.yml +12 -0
  137. package/node_modules/side-channel-weakmap/.nycrc +13 -0
  138. package/node_modules/side-channel-weakmap/CHANGELOG.md +28 -0
  139. package/node_modules/side-channel-weakmap/LICENSE +21 -0
  140. package/node_modules/side-channel-weakmap/README.md +62 -0
  141. package/node_modules/side-channel-weakmap/index.d.ts +15 -0
  142. package/node_modules/side-channel-weakmap/index.js +84 -0
  143. package/node_modules/side-channel-weakmap/package.json +87 -0
  144. package/node_modules/side-channel-weakmap/test/index.js +114 -0
  145. package/node_modules/side-channel-weakmap/tsconfig.json +9 -0
  146. package/node_modules/yaml/README.md +27 -8
  147. package/node_modules/yaml/browser/dist/compose/resolve-props.js +1 -1
  148. package/node_modules/yaml/browser/dist/log.js +1 -4
  149. package/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js +2 -11
  150. package/node_modules/yaml/browser/dist/util.js +1 -1
  151. package/node_modules/yaml/dist/compose/compose-collection.d.ts +4 -4
  152. package/node_modules/yaml/dist/compose/compose-doc.d.ts +6 -6
  153. package/node_modules/yaml/dist/compose/compose-node.d.ts +7 -7
  154. package/node_modules/yaml/dist/compose/compose-scalar.d.ts +4 -4
  155. package/node_modules/yaml/dist/compose/composer.d.ts +7 -6
  156. package/node_modules/yaml/dist/compose/composer.js +2 -1
  157. package/node_modules/yaml/dist/compose/resolve-block-map.d.ts +5 -5
  158. package/node_modules/yaml/dist/compose/resolve-block-scalar.d.ts +5 -5
  159. package/node_modules/yaml/dist/compose/resolve-block-seq.d.ts +5 -5
  160. package/node_modules/yaml/dist/compose/resolve-end.d.ts +2 -2
  161. package/node_modules/yaml/dist/compose/resolve-flow-collection.d.ts +7 -7
  162. package/node_modules/yaml/dist/compose/resolve-flow-scalar.d.ts +4 -4
  163. package/node_modules/yaml/dist/compose/resolve-props.d.ts +2 -2
  164. package/node_modules/yaml/dist/compose/resolve-props.js +1 -1
  165. package/node_modules/yaml/dist/compose/util-contains-newline.d.ts +1 -1
  166. package/node_modules/yaml/dist/compose/util-empty-scalar-position.d.ts +1 -1
  167. package/node_modules/yaml/dist/compose/util-flow-indent-check.d.ts +2 -2
  168. package/node_modules/yaml/dist/compose/util-map-includes.d.ts +3 -3
  169. package/node_modules/yaml/dist/doc/Document.d.ts +11 -11
  170. package/node_modules/yaml/dist/doc/anchors.d.ts +2 -2
  171. package/node_modules/yaml/dist/doc/createNode.d.ts +4 -4
  172. package/node_modules/yaml/dist/doc/directives.d.ts +1 -1
  173. package/node_modules/yaml/dist/index.d.ts +21 -18
  174. package/node_modules/yaml/dist/log.js +4 -2
  175. package/node_modules/yaml/dist/nodes/Alias.d.ts +9 -8
  176. package/node_modules/yaml/dist/nodes/Collection.d.ts +4 -4
  177. package/node_modules/yaml/dist/nodes/Node.d.ts +10 -10
  178. package/node_modules/yaml/dist/nodes/Pair.d.ts +9 -8
  179. package/node_modules/yaml/dist/nodes/Scalar.d.ts +4 -3
  180. package/node_modules/yaml/dist/nodes/YAMLMap.d.ts +10 -10
  181. package/node_modules/yaml/dist/nodes/YAMLSeq.d.ts +10 -10
  182. package/node_modules/yaml/dist/nodes/addPairToJSMap.d.ts +3 -3
  183. package/node_modules/yaml/dist/nodes/identity.d.ts +7 -7
  184. package/node_modules/yaml/dist/nodes/toJS.d.ts +2 -2
  185. package/node_modules/yaml/dist/options.d.ts +10 -10
  186. package/node_modules/yaml/dist/parse/cst-scalar.d.ts +4 -4
  187. package/node_modules/yaml/dist/parse/cst-stringify.d.ts +1 -1
  188. package/node_modules/yaml/dist/parse/cst-visit.d.ts +2 -2
  189. package/node_modules/yaml/dist/parse/cst.d.ts +4 -3
  190. package/node_modules/yaml/dist/parse/lexer.d.ts +1 -1
  191. package/node_modules/yaml/dist/parse/parser.d.ts +4 -4
  192. package/node_modules/yaml/dist/parse/parser.js +2 -1
  193. package/node_modules/yaml/dist/public-api.d.ts +6 -5
  194. package/node_modules/yaml/dist/schema/Schema.d.ts +4 -4
  195. package/node_modules/yaml/dist/schema/common/map.d.ts +1 -1
  196. package/node_modules/yaml/dist/schema/common/null.d.ts +1 -1
  197. package/node_modules/yaml/dist/schema/common/seq.d.ts +1 -1
  198. package/node_modules/yaml/dist/schema/common/string.d.ts +1 -1
  199. package/node_modules/yaml/dist/schema/core/bool.d.ts +1 -1
  200. package/node_modules/yaml/dist/schema/core/float.d.ts +1 -1
  201. package/node_modules/yaml/dist/schema/core/int.d.ts +1 -1
  202. package/node_modules/yaml/dist/schema/core/schema.d.ts +1 -1
  203. package/node_modules/yaml/dist/schema/json/schema.d.ts +1 -1
  204. package/node_modules/yaml/dist/schema/tags.d.ts +2 -2
  205. package/node_modules/yaml/dist/schema/types.d.ts +8 -8
  206. package/node_modules/yaml/dist/schema/yaml-1.1/binary.d.ts +1 -1
  207. package/node_modules/yaml/dist/schema/yaml-1.1/binary.js +6 -5
  208. package/node_modules/yaml/dist/schema/yaml-1.1/bool.d.ts +1 -1
  209. package/node_modules/yaml/dist/schema/yaml-1.1/float.d.ts +1 -1
  210. package/node_modules/yaml/dist/schema/yaml-1.1/int.d.ts +1 -1
  211. package/node_modules/yaml/dist/schema/yaml-1.1/merge.d.ts +3 -3
  212. package/node_modules/yaml/dist/schema/yaml-1.1/omap.d.ts +11 -17
  213. package/node_modules/yaml/dist/schema/yaml-1.1/pairs.d.ts +7 -7
  214. package/node_modules/yaml/dist/schema/yaml-1.1/schema.d.ts +1 -1
  215. package/node_modules/yaml/dist/schema/yaml-1.1/set.d.ts +9 -9
  216. package/node_modules/yaml/dist/schema/yaml-1.1/timestamp.d.ts +1 -1
  217. package/node_modules/yaml/dist/stringify/stringify.d.ts +3 -3
  218. package/node_modules/yaml/dist/stringify/stringifyCollection.d.ts +2 -2
  219. package/node_modules/yaml/dist/stringify/stringifyDocument.d.ts +3 -3
  220. package/node_modules/yaml/dist/stringify/stringifyNumber.d.ts +1 -1
  221. package/node_modules/yaml/dist/stringify/stringifyPair.d.ts +2 -2
  222. package/node_modules/yaml/dist/stringify/stringifyString.d.ts +2 -2
  223. package/node_modules/yaml/dist/util.d.ts +16 -12
  224. package/node_modules/yaml/dist/util.js +2 -2
  225. package/node_modules/yaml/dist/visit.d.ts +7 -7
  226. package/node_modules/yaml/package.json +4 -4
  227. package/package.json +1 -1
  228. package/node_modules/call-bind/.eslintignore +0 -1
  229. package/node_modules/call-bind/CHANGELOG.md +0 -106
  230. package/node_modules/call-bind/README.md +0 -64
  231. package/node_modules/call-bind/callBound.js +0 -15
  232. package/node_modules/call-bind/index.js +0 -24
  233. package/node_modules/call-bind/test/index.js +0 -74
  234. package/node_modules/define-data-property/.eslintrc +0 -24
  235. package/node_modules/define-data-property/CHANGELOG.md +0 -70
  236. package/node_modules/define-data-property/README.md +0 -67
  237. package/node_modules/define-data-property/index.d.ts +0 -12
  238. package/node_modules/define-data-property/index.js +0 -56
  239. package/node_modules/define-data-property/package.json +0 -106
  240. package/node_modules/define-data-property/test/index.js +0 -392
  241. package/node_modules/define-data-property/tsconfig.json +0 -59
  242. package/node_modules/has-property-descriptors/.eslintrc +0 -13
  243. package/node_modules/has-property-descriptors/CHANGELOG.md +0 -35
  244. package/node_modules/has-property-descriptors/README.md +0 -43
  245. package/node_modules/has-property-descriptors/index.js +0 -22
  246. package/node_modules/has-property-descriptors/test/index.js +0 -57
  247. package/node_modules/set-function-length/.eslintrc +0 -27
  248. package/node_modules/set-function-length/CHANGELOG.md +0 -70
  249. package/node_modules/set-function-length/README.md +0 -56
  250. package/node_modules/set-function-length/env.d.ts +0 -9
  251. package/node_modules/set-function-length/env.js +0 -25
  252. package/node_modules/set-function-length/index.d.ts +0 -7
  253. package/node_modules/set-function-length/index.js +0 -42
  254. package/node_modules/set-function-length/package.json +0 -102
  255. /package/node_modules/{call-bind → call-bound}/.nycrc +0 -0
  256. /package/node_modules/{has-property-descriptors → get-proto}/.nycrc +0 -0
  257. /package/node_modules/{define-data-property → side-channel-list}/.nycrc +0 -0
  258. /package/node_modules/{set-function-length → side-channel-list}/tsconfig.json +0 -0
  259. /package/node_modules/{set-function-length → side-channel-map}/.nycrc +0 -0
@@ -35,7 +35,16 @@ test('setDunderProto', { skip: !setDunderProto }, function (t) {
35
35
  });
36
36
 
37
37
  test('no dunder proto', { skip: !!setDunderProto }, function (t) {
38
- t.notOk('__proto__' in Object.prototype, 'no __proto__ in Object.prototype');
38
+ if ('__proto__' in Object.prototype) {
39
+ t['throws'](
40
+ // @ts-expect-error
41
+ function () { ({}).__proto__ = null; }, // eslint-disable-line no-proto
42
+ Error,
43
+ 'throws when setting Object.prototype.__proto__'
44
+ );
45
+ } else {
46
+ t.notOk('__proto__' in Object.prototype, 'no __proto__ in Object.prototype');
47
+ }
39
48
 
40
49
  t.end();
41
50
  });
@@ -0,0 +1,16 @@
1
+ {
2
+ "root": true,
3
+
4
+ "extends": "@ljharb",
5
+
6
+ "rules": {
7
+ "eqeqeq": ["error", "allow-null"],
8
+ "id-length": "off",
9
+ "new-cap": ["error", {
10
+ "capIsNewExceptions": [
11
+ "RequireObjectCoercible",
12
+ "ToObject",
13
+ ],
14
+ }],
15
+ },
16
+ }
@@ -4,7 +4,7 @@ github: [ljharb]
4
4
  patreon: # Replace with a single Patreon username
5
5
  open_collective: # Replace with a single Open Collective username
6
6
  ko_fi: # Replace with a single Ko-fi username
7
- tidelift: npm/set-function-name
7
+ tidelift: npm/es-object
8
8
  community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9
9
  liberapay: # Replace with a single Liberapay username
10
10
  issuehunt: # Replace with a single IssueHunt username
@@ -0,0 +1,37 @@
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.1.1](https://github.com/ljharb/es-object-atoms/compare/v1.1.0...v1.1.1) - 2025-01-14
9
+
10
+ ### Commits
11
+
12
+ - [types] `ToObject`: improve types [`cfe8c8a`](https://github.com/ljharb/es-object-atoms/commit/cfe8c8a105c44820cb22e26f62d12ef0ad9715c8)
13
+
14
+ ## [v1.1.0](https://github.com/ljharb/es-object-atoms/compare/v1.0.1...v1.1.0) - 2025-01-14
15
+
16
+ ### Commits
17
+
18
+ - [New] add `isObject` [`51e4042`](https://github.com/ljharb/es-object-atoms/commit/51e4042df722eb3165f40dc5f4bf33d0197ecb07)
19
+
20
+ ## [v1.0.1](https://github.com/ljharb/es-object-atoms/compare/v1.0.0...v1.0.1) - 2025-01-13
21
+
22
+ ### Commits
23
+
24
+ - [Dev Deps] update `@ljharb/eslint-config`, `@ljharb/tsconfig`, `@types/tape`, `auto-changelog`, `tape` [`38ab9eb`](https://github.com/ljharb/es-object-atoms/commit/38ab9eb00b62c2f4668644f5e513d9b414ebd595)
25
+ - [types] improve types [`7d1beb8`](https://github.com/ljharb/es-object-atoms/commit/7d1beb887958b78b6a728a210a1c8370ab7e2aa1)
26
+ - [Tests] replace `aud` with `npm audit` [`25863ba`](https://github.com/ljharb/es-object-atoms/commit/25863baf99178f1d1ad33d1120498db28631907e)
27
+ - [Dev Deps] add missing peer dep [`c012309`](https://github.com/ljharb/es-object-atoms/commit/c0123091287e6132d6f4240496340c427433df28)
28
+
29
+ ## v1.0.0 - 2024-03-16
30
+
31
+ ### Commits
32
+
33
+ - Initial implementation, tests, readme, types [`f1499db`](https://github.com/ljharb/es-object-atoms/commit/f1499db7d3e1741e64979c61d645ab3137705e82)
34
+ - Initial commit [`99eedc7`](https://github.com/ljharb/es-object-atoms/commit/99eedc7b5fde38a50a28d3c8b724706e3e4c5f6a)
35
+ - [meta] rename repo [`fc851fa`](https://github.com/ljharb/es-object-atoms/commit/fc851fa70616d2d182aaf0bd02c2ed7084dea8fa)
36
+ - npm init [`b909377`](https://github.com/ljharb/es-object-atoms/commit/b909377c50049bd0ec575562d20b0f9ebae8947f)
37
+ - Only apps should have lockfiles [`7249edd`](https://github.com/ljharb/es-object-atoms/commit/7249edd2178c1b9ddfc66ffcc6d07fdf0d28efc1)
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2022 Inspect JS
3
+ Copyright (c) 2024 Jordan Harband
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -0,0 +1,63 @@
1
+ # es-object-atoms <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
+ ES Object-related atoms: Object, ToObject, RequireObjectCoercible.
11
+
12
+ ## Example
13
+
14
+ ```js
15
+ const assert = require('assert');
16
+
17
+ const $Object = require('es-object-atoms');
18
+ const isObject = require('es-object-atoms/isObject');
19
+ const ToObject = require('es-object-atoms/ToObject');
20
+ const RequireObjectCoercible = require('es-object-atoms/RequireObjectCoercible');
21
+
22
+ assert.equal($Object, Object);
23
+ assert.throws(() => ToObject(null), TypeError);
24
+ assert.throws(() => ToObject(undefined), TypeError);
25
+ assert.throws(() => RequireObjectCoercible(null), TypeError);
26
+ assert.throws(() => RequireObjectCoercible(undefined), TypeError);
27
+
28
+ assert.equal(isObject(undefined), false);
29
+ assert.equal(isObject(null), false);
30
+ assert.equal(isObject({}), true);
31
+ assert.equal(isObject([]), true);
32
+ assert.equal(isObject(function () {}), true);
33
+
34
+ assert.deepEqual(RequireObjectCoercible(true), true);
35
+ assert.deepEqual(ToObject(true), Object(true));
36
+
37
+ const obj = {};
38
+ assert.equal(RequireObjectCoercible(obj), obj);
39
+ assert.equal(ToObject(obj), obj);
40
+ ```
41
+
42
+ ## Tests
43
+ Simply clone the repo, `npm install`, and run `npm test`
44
+
45
+ ## Security
46
+
47
+ Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report.
48
+
49
+ [package-url]: https://npmjs.org/package/es-object-atoms
50
+ [npm-version-svg]: https://versionbadg.es/ljharb/es-object-atoms.svg
51
+ [deps-svg]: https://david-dm.org/ljharb/es-object-atoms.svg
52
+ [deps-url]: https://david-dm.org/ljharb/es-object-atoms
53
+ [dev-deps-svg]: https://david-dm.org/ljharb/es-object-atoms/dev-status.svg
54
+ [dev-deps-url]: https://david-dm.org/ljharb/es-object-atoms#info=devDependencies
55
+ [npm-badge-png]: https://nodei.co/npm/es-object-atoms.png?downloads=true&stars=true
56
+ [license-image]: https://img.shields.io/npm/l/es-object-atoms.svg
57
+ [license-url]: LICENSE
58
+ [downloads-image]: https://img.shields.io/npm/dm/es-object.svg
59
+ [downloads-url]: https://npm-stat.com/charts.html?package=es-object-atoms
60
+ [codecov-image]: https://codecov.io/gh/ljharb/es-object-atoms/branch/main/graphs/badge.svg
61
+ [codecov-url]: https://app.codecov.io/gh/ljharb/es-object-atoms/
62
+ [actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/es-object-atoms
63
+ [actions-url]: https://github.com/ljharb/es-object-atoms/actions
@@ -0,0 +1,3 @@
1
+ declare function RequireObjectCoercible<T extends {}>(value: T, optMessage?: string): T;
2
+
3
+ export = RequireObjectCoercible;
@@ -0,0 +1,11 @@
1
+ 'use strict';
2
+
3
+ var $TypeError = require('es-errors/type');
4
+
5
+ /** @type {import('./RequireObjectCoercible')} */
6
+ module.exports = function RequireObjectCoercible(value) {
7
+ if (value == null) {
8
+ throw new $TypeError((arguments.length > 0 && arguments[1]) || ('Cannot call method on ' + value));
9
+ }
10
+ return value;
11
+ };
@@ -0,0 +1,7 @@
1
+ declare function ToObject<T extends object>(value: number): Number;
2
+ declare function ToObject<T extends object>(value: boolean): Boolean;
3
+ declare function ToObject<T extends object>(value: string): String;
4
+ declare function ToObject<T extends object>(value: bigint): BigInt;
5
+ declare function ToObject<T extends object>(value: T): T;
6
+
7
+ export = ToObject;
@@ -0,0 +1,10 @@
1
+ 'use strict';
2
+
3
+ var $Object = require('./');
4
+ var RequireObjectCoercible = require('./RequireObjectCoercible');
5
+
6
+ /** @type {import('./ToObject')} */
7
+ module.exports = function ToObject(value) {
8
+ RequireObjectCoercible(value);
9
+ return $Object(value);
10
+ };
@@ -0,0 +1,3 @@
1
+ declare const Object: ObjectConstructor;
2
+
3
+ export = Object;
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+
3
+ /** @type {import('.')} */
4
+ module.exports = Object;
@@ -0,0 +1,3 @@
1
+ declare function isObject(x: unknown): x is object;
2
+
3
+ export = isObject;
@@ -0,0 +1,6 @@
1
+ 'use strict';
2
+
3
+ /** @type {import('./isObject')} */
4
+ module.exports = function isObject(x) {
5
+ return !!x && (typeof x === 'function' || typeof x === 'object');
6
+ };
@@ -0,0 +1,80 @@
1
+ {
2
+ "name": "es-object-atoms",
3
+ "version": "1.1.1",
4
+ "description": "ES Object-related atoms: Object, ToObject, RequireObjectCoercible",
5
+ "main": "index.js",
6
+ "exports": {
7
+ ".": "./index.js",
8
+ "./RequireObjectCoercible": "./RequireObjectCoercible.js",
9
+ "./isObject": "./isObject.js",
10
+ "./ToObject": "./ToObject.js",
11
+ "./package.json": "./package.json"
12
+ },
13
+ "sideEffects": false,
14
+ "scripts": {
15
+ "prepack": "npmignore --auto --commentLines=autogenerated",
16
+ "prepublishOnly": "safe-publish-latest",
17
+ "prepublish": "not-in-publish || npm run prepublishOnly",
18
+ "pretest": "npm run lint",
19
+ "test": "npm run tests-only",
20
+ "tests-only": "nyc tape 'test/**/*.js'",
21
+ "posttest": "npx npm@\">= 10.2\" audit --production",
22
+ "prelint": "evalmd README.md",
23
+ "lint": "eslint --ext=js,mjs .",
24
+ "postlint": "tsc -p . && eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git' | grep -v dist/)",
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/ljharb/es-object-atoms.git"
31
+ },
32
+ "keywords": [
33
+ "javascript",
34
+ "ecmascript",
35
+ "object",
36
+ "toobject",
37
+ "coercible"
38
+ ],
39
+ "author": "Jordan Harband <ljharb@gmail.com>",
40
+ "license": "MIT",
41
+ "bugs": {
42
+ "url": "https://github.com/ljharb/es-object-atoms/issues"
43
+ },
44
+ "homepage": "https://github.com/ljharb/es-object-atoms#readme",
45
+ "dependencies": {
46
+ "es-errors": "^1.3.0"
47
+ },
48
+ "devDependencies": {
49
+ "@ljharb/eslint-config": "^21.1.1",
50
+ "@ljharb/tsconfig": "^0.2.3",
51
+ "@types/tape": "^5.8.1",
52
+ "auto-changelog": "^2.5.0",
53
+ "eclint": "^2.8.1",
54
+ "encoding": "^0.1.13",
55
+ "eslint": "^8.8.0",
56
+ "evalmd": "^0.0.19",
57
+ "in-publish": "^2.0.1",
58
+ "npmignore": "^0.3.1",
59
+ "nyc": "^10.3.2",
60
+ "safe-publish-latest": "^2.0.0",
61
+ "tape": "^5.9.0",
62
+ "typescript": "next"
63
+ },
64
+ "auto-changelog": {
65
+ "output": "CHANGELOG.md",
66
+ "template": "keepachangelog",
67
+ "unreleased": false,
68
+ "commitLimit": false,
69
+ "backfillLimit": false,
70
+ "hideCredit": true
71
+ },
72
+ "publishConfig": {
73
+ "ignore": [
74
+ ".github/workflows"
75
+ ]
76
+ },
77
+ "engines": {
78
+ "node": ">= 0.4"
79
+ }
80
+ }
@@ -0,0 +1,38 @@
1
+ 'use strict';
2
+
3
+ var test = require('tape');
4
+
5
+ var $Object = require('../');
6
+ var isObject = require('../isObject');
7
+ var ToObject = require('../ToObject');
8
+ var RequireObjectCoercible = require('..//RequireObjectCoercible');
9
+
10
+ test('errors', function (t) {
11
+ t.equal($Object, Object);
12
+ // @ts-expect-error
13
+ t['throws'](function () { ToObject(null); }, TypeError);
14
+ // @ts-expect-error
15
+ t['throws'](function () { ToObject(undefined); }, TypeError);
16
+ // @ts-expect-error
17
+ t['throws'](function () { RequireObjectCoercible(null); }, TypeError);
18
+ // @ts-expect-error
19
+ t['throws'](function () { RequireObjectCoercible(undefined); }, TypeError);
20
+
21
+ t.deepEqual(RequireObjectCoercible(true), true);
22
+ t.deepEqual(ToObject(true), Object(true));
23
+ t.deepEqual(ToObject(42), Object(42));
24
+ var f = function () {};
25
+ t.equal(ToObject(f), f);
26
+
27
+ t.equal(isObject(undefined), false);
28
+ t.equal(isObject(null), false);
29
+ t.equal(isObject({}), true);
30
+ t.equal(isObject([]), true);
31
+ t.equal(isObject(function () {}), true);
32
+
33
+ var obj = {};
34
+ t.equal(RequireObjectCoercible(obj), obj);
35
+ t.equal(ToObject(obj), obj);
36
+
37
+ t.end();
38
+ });
@@ -0,0 +1,6 @@
1
+ {
2
+ "extends": "@ljharb/tsconfig",
3
+ "compilerOptions": {
4
+ "target": "es5",
5
+ },
6
+ }
@@ -11,6 +11,10 @@
11
11
  "es2022": true,
12
12
  },
13
13
 
14
+ "globals": {
15
+ "Float16Array": false,
16
+ },
17
+
14
18
  "rules": {
15
19
  "array-bracket-newline": 0,
16
20
  "complexity": 0,
@@ -5,6 +5,31 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [v1.3.0](https://github.com/ljharb/get-intrinsic/compare/v1.2.7...v1.3.0) - 2025-02-22
9
+
10
+ ### Commits
11
+
12
+ - [Dev Deps] update `es-abstract`, `es-value-fixtures`, `for-each`, `object-inspect` [`9b61553`](https://github.com/ljharb/get-intrinsic/commit/9b61553c587f1c1edbd435597e88c7d387da97dd)
13
+ - [Deps] update `call-bind-apply-helpers`, `es-object-atoms`, `get-proto` [`a341fee`](https://github.com/ljharb/get-intrinsic/commit/a341fee0f39a403b0f0069e82c97642d5eb11043)
14
+ - [New] add `Float16Array` [`de22116`](https://github.com/ljharb/get-intrinsic/commit/de22116b492fb989a0341bceb6e573abfaed73dc)
15
+
16
+ ## [v1.2.7](https://github.com/ljharb/get-intrinsic/compare/v1.2.6...v1.2.7) - 2025-01-02
17
+
18
+ ### Commits
19
+
20
+ - [Refactor] use `get-proto` directly [`00ab955`](https://github.com/ljharb/get-intrinsic/commit/00ab95546a0980c8ad42a84253daaa8d2adcedf9)
21
+ - [Deps] update `math-intrinsics` [`c716cdd`](https://github.com/ljharb/get-intrinsic/commit/c716cdd6bbe36b438057025561b8bb5a879ac8a0)
22
+ - [Dev Deps] update `call-bound`, `es-abstract` [`dc648a6`](https://github.com/ljharb/get-intrinsic/commit/dc648a67eb359037dff8d8619bfa71d86debccb1)
23
+
24
+ ## [v1.2.6](https://github.com/ljharb/get-intrinsic/compare/v1.2.5...v1.2.6) - 2024-12-11
25
+
26
+ ### Commits
27
+
28
+ - [Refactor] use `math-intrinsics` [`841be86`](https://github.com/ljharb/get-intrinsic/commit/841be8641a9254c4c75483b30c8871b5d5065926)
29
+ - [Refactor] use `es-object-atoms` [`42057df`](https://github.com/ljharb/get-intrinsic/commit/42057dfa16f66f64787e66482af381cc6f31d2c1)
30
+ - [Deps] update `call-bind-apply-helpers` [`45afa24`](https://github.com/ljharb/get-intrinsic/commit/45afa24a9ee4d6d3c172db1f555b16cb27843ef4)
31
+ - [Dev Deps] update `call-bound` [`9cba9c6`](https://github.com/ljharb/get-intrinsic/commit/9cba9c6e70212bc163b7a5529cb25df46071646f)
32
+
8
33
  ## [v1.2.5](https://github.com/ljharb/get-intrinsic/compare/v1.2.4...v1.2.5) - 2024-12-06
9
34
 
10
35
  ### Commits
@@ -2,6 +2,8 @@
2
2
 
3
3
  var undefined;
4
4
 
5
+ var $Object = require('es-object-atoms');
6
+
5
7
  var $Error = require('es-errors');
6
8
  var $EvalError = require('es-errors/eval');
7
9
  var $RangeError = require('es-errors/range');
@@ -10,6 +12,14 @@ var $SyntaxError = require('es-errors/syntax');
10
12
  var $TypeError = require('es-errors/type');
11
13
  var $URIError = require('es-errors/uri');
12
14
 
15
+ var abs = require('math-intrinsics/abs');
16
+ var floor = require('math-intrinsics/floor');
17
+ var max = require('math-intrinsics/max');
18
+ var min = require('math-intrinsics/min');
19
+ var pow = require('math-intrinsics/pow');
20
+ var round = require('math-intrinsics/round');
21
+ var sign = require('math-intrinsics/sign');
22
+
13
23
  var $Function = Function;
14
24
 
15
25
  // eslint-disable-next-line consistent-return
@@ -43,11 +53,10 @@ var ThrowTypeError = $gOPD
43
53
  : throwTypeError;
44
54
 
45
55
  var hasSymbols = require('has-symbols')();
46
- var getDunderProto = require('dunder-proto/get');
47
56
 
48
- var getProto = (typeof Reflect === 'function' && Reflect.getPrototypeOf)
49
- || Object.getPrototypeOf
50
- || getDunderProto;
57
+ var getProto = require('get-proto');
58
+ var $ObjectGPO = require('get-proto/Object.getPrototypeOf');
59
+ var $ReflectGPO = require('get-proto/Reflect.getPrototypeOf');
51
60
 
52
61
  var $apply = require('call-bind-apply-helpers/functionApply');
53
62
  var $call = require('call-bind-apply-helpers/functionCall');
@@ -81,6 +90,7 @@ var INTRINSICS = {
81
90
  '%Error%': $Error,
82
91
  '%eval%': eval, // eslint-disable-line no-eval
83
92
  '%EvalError%': $EvalError,
93
+ '%Float16Array%': typeof Float16Array === 'undefined' ? undefined : Float16Array,
84
94
  '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,
85
95
  '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,
86
96
  '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,
@@ -97,7 +107,7 @@ var INTRINSICS = {
97
107
  '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),
98
108
  '%Math%': Math,
99
109
  '%Number%': Number,
100
- '%Object%': Object,
110
+ '%Object%': $Object,
101
111
  '%Object.getOwnPropertyDescriptor%': $gOPD,
102
112
  '%parseFloat%': parseFloat,
103
113
  '%parseInt%': parseInt,
@@ -128,7 +138,16 @@ var INTRINSICS = {
128
138
 
129
139
  '%Function.prototype.call%': $call,
130
140
  '%Function.prototype.apply%': $apply,
131
- '%Object.defineProperty%': $defineProperty
141
+ '%Object.defineProperty%': $defineProperty,
142
+ '%Object.getPrototypeOf%': $ObjectGPO,
143
+ '%Math.abs%': abs,
144
+ '%Math.floor%': floor,
145
+ '%Math.max%': max,
146
+ '%Math.min%': min,
147
+ '%Math.pow%': pow,
148
+ '%Math.round%': round,
149
+ '%Math.sign%': sign,
150
+ '%Reflect.getPrototypeOf%': $ReflectGPO
132
151
  };
133
152
 
134
153
  if (getProto) {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "get-intrinsic",
3
- "version": "1.2.5",
3
+ "version": "1.3.0",
4
4
  "description": "Get and robustly cache all JS language-level intrinsics at first require time",
5
5
  "main": "index.js",
6
6
  "exports": {
@@ -44,32 +44,34 @@
44
44
  },
45
45
  "homepage": "https://github.com/ljharb/get-intrinsic#readme",
46
46
  "dependencies": {
47
- "call-bind-apply-helpers": "^1.0.0",
48
- "dunder-proto": "^1.0.0",
47
+ "call-bind-apply-helpers": "^1.0.2",
49
48
  "es-define-property": "^1.0.1",
50
49
  "es-errors": "^1.3.0",
50
+ "es-object-atoms": "^1.1.1",
51
51
  "function-bind": "^1.1.2",
52
+ "get-proto": "^1.0.1",
52
53
  "gopd": "^1.2.0",
53
54
  "has-symbols": "^1.1.0",
54
- "hasown": "^2.0.2"
55
+ "hasown": "^2.0.2",
56
+ "math-intrinsics": "^1.1.0"
55
57
  },
56
58
  "devDependencies": {
57
59
  "@ljharb/eslint-config": "^21.1.1",
58
60
  "auto-changelog": "^2.5.0",
59
- "call-bound": "^1.0.1",
61
+ "call-bound": "^1.0.3",
60
62
  "encoding": "^0.1.13",
61
- "es-abstract": "^1.23.5",
62
- "es-value-fixtures": "^1.5.0",
63
+ "es-abstract": "^1.23.9",
64
+ "es-value-fixtures": "^1.7.1",
63
65
  "eslint": "=8.8.0",
64
66
  "evalmd": "^0.0.19",
65
- "for-each": "^0.3.3",
67
+ "for-each": "^0.3.5",
66
68
  "make-async-function": "^1.0.0",
67
69
  "make-async-generator-function": "^1.0.0",
68
70
  "make-generator-function": "^2.0.0",
69
71
  "mock-property": "^1.1.0",
70
72
  "npmignore": "^0.3.1",
71
73
  "nyc": "^10.3.2",
72
- "object-inspect": "^1.13.3",
74
+ "object-inspect": "^1.13.4",
73
75
  "safe-publish-latest": "^2.0.0",
74
76
  "tape": "^5.9.0"
75
77
  },
@@ -0,0 +1,10 @@
1
+ {
2
+ "root": true,
3
+
4
+ "extends": "@ljharb",
5
+
6
+ "rules": {
7
+ "id-length": "off",
8
+ "sort-keys": "off",
9
+ },
10
+ }
@@ -4,7 +4,7 @@ github: [ljharb]
4
4
  patreon: # Replace with a single Patreon username
5
5
  open_collective: # Replace with a single Open Collective username
6
6
  ko_fi: # Replace with a single Ko-fi username
7
- tidelift: npm/call-bind
7
+ tidelift: npm/get-proto
8
8
  community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9
9
  liberapay: # Replace with a single Liberapay username
10
10
  issuehunt: # Replace with a single IssueHunt username
@@ -0,0 +1,21 @@
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.0.1](https://github.com/ljharb/get-proto/compare/v1.0.0...v1.0.1) - 2025-01-02
9
+
10
+ ### Commits
11
+
12
+ - [Fix] for the `Object.getPrototypeOf` window, throw for non-objects [`7fe6508`](https://github.com/ljharb/get-proto/commit/7fe6508b71419ebe1976bedb86001d1feaeaa49a)
13
+
14
+ ## v1.0.0 - 2025-01-01
15
+
16
+ ### Commits
17
+
18
+ - Initial implementation, tests, readme, types [`5c70775`](https://github.com/ljharb/get-proto/commit/5c707751e81c3deeb2cf980d185fc7fd43611415)
19
+ - Initial commit [`7c65c2a`](https://github.com/ljharb/get-proto/commit/7c65c2ad4e33d5dae2f219ebe1a046ae2256972c)
20
+ - npm init [`0b8cf82`](https://github.com/ljharb/get-proto/commit/0b8cf824c9634e4a34ef7dd2a2cdc5be6ac79518)
21
+ - Only apps should have lockfiles [`a6d1bff`](https://github.com/ljharb/get-proto/commit/a6d1bffc364f5828377cea7194558b2dbef7aea2)
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2023 Jordan Harband
3
+ Copyright (c) 2025 Jordan Harband
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -0,0 +1,5 @@
1
+ declare function getProto<O extends object>(object: O): object | null;
2
+
3
+ declare const x: typeof getProto | null;
4
+
5
+ export = x;
@@ -0,0 +1,6 @@
1
+ 'use strict';
2
+
3
+ var $Object = require('es-object-atoms');
4
+
5
+ /** @type {import('./Object.getPrototypeOf')} */
6
+ module.exports = $Object.getPrototypeOf || null;
@@ -0,0 +1,50 @@
1
+ # get-proto <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
+ Robustly get the [[Prototype]] of an object. Uses the best available method.
11
+
12
+ ## Getting started
13
+
14
+ ```sh
15
+ npm install --save get-proto
16
+ ```
17
+
18
+ ## Usage/Examples
19
+
20
+ ```js
21
+ const assert = require('assert');
22
+ const getProto = require('get-proto');
23
+
24
+ const a = { a: 1, b: 2, [Symbol.toStringTag]: 'foo' };
25
+ const b = { c: 3, __proto__: a };
26
+
27
+ assert.equal(getProto(b), a);
28
+ assert.equal(getProto(a), Object.prototype);
29
+ assert.equal(getProto({ __proto__: null }), null);
30
+ ```
31
+
32
+ ## Tests
33
+
34
+ Clone the repo, `npm install`, and run `npm test`
35
+
36
+ [package-url]: https://npmjs.org/package/get-proto
37
+ [npm-version-svg]: https://versionbadg.es/ljharb/get-proto.svg
38
+ [deps-svg]: https://david-dm.org/ljharb/get-proto.svg
39
+ [deps-url]: https://david-dm.org/ljharb/get-proto
40
+ [dev-deps-svg]: https://david-dm.org/ljharb/get-proto/dev-status.svg
41
+ [dev-deps-url]: https://david-dm.org/ljharb/get-proto#info=devDependencies
42
+ [npm-badge-png]: https://nodei.co/npm/get-proto.png?downloads=true&stars=true
43
+ [license-image]: https://img.shields.io/npm/l/get-proto.svg
44
+ [license-url]: LICENSE
45
+ [downloads-image]: https://img.shields.io/npm/dm/get-proto.svg
46
+ [downloads-url]: https://npm-stat.com/charts.html?package=get-proto
47
+ [codecov-image]: https://codecov.io/gh/ljharb/get-proto/branch/main/graphs/badge.svg
48
+ [codecov-url]: https://app.codecov.io/gh/ljharb/get-proto/
49
+ [actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/get-proto
50
+ [actions-url]: https://github.com/ljharb/get-proto/actions
@@ -0,0 +1,3 @@
1
+ declare const x: typeof Reflect.getPrototypeOf | null;
2
+
3
+ export = x;
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+
3
+ /** @type {import('./Reflect.getPrototypeOf')} */
4
+ module.exports = (typeof Reflect !== 'undefined' && Reflect.getPrototypeOf) || null;
@@ -0,0 +1,5 @@
1
+ declare function getProto<O extends object>(object: O): object | null;
2
+
3
+ declare const x: typeof getProto | null;
4
+
5
+ export = x;