styled-map-package 4.1.0 → 5.0.0-pre.1

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 (238) hide show
  1. package/README.md +47 -7
  2. package/bin/smp-download.js +27 -151
  3. package/bin/smp-mbtiles.js +12 -7
  4. package/bin/smp-view.js +32 -54
  5. package/lib/commands/download.js +188 -0
  6. package/lib/commands/mbtiles.js +21 -0
  7. package/lib/commands/view.js +57 -0
  8. package/lib/reporters.js +92 -0
  9. package/package.json +9 -181
  10. package/LICENSE.md +0 -7
  11. package/dist/download.cjs +0 -101
  12. package/dist/download.d.cts +0 -65
  13. package/dist/download.d.ts +0 -65
  14. package/dist/download.js +0 -77
  15. package/dist/from-mbtiles.cjs +0 -91
  16. package/dist/from-mbtiles.d.cts +0 -17
  17. package/dist/from-mbtiles.d.ts +0 -17
  18. package/dist/from-mbtiles.js +0 -57
  19. package/dist/index.cjs +0 -49
  20. package/dist/index.d.cts +0 -27
  21. package/dist/index.d.ts +0 -27
  22. package/dist/index.js +0 -18
  23. package/dist/reader-watch.cjs +0 -135
  24. package/dist/reader-watch.d.cts +0 -24
  25. package/dist/reader-watch.d.ts +0 -24
  26. package/dist/reader-watch.js +0 -101
  27. package/dist/reader.cjs +0 -168
  28. package/dist/reader.d.cts +0 -62
  29. package/dist/reader.d.ts +0 -62
  30. package/dist/reader.js +0 -139
  31. package/dist/reporters.cjs +0 -122
  32. package/dist/reporters.d.cts +0 -10
  33. package/dist/reporters.d.ts +0 -10
  34. package/dist/reporters.js +0 -88
  35. package/dist/server.cjs +0 -78
  36. package/dist/server.d.cts +0 -48
  37. package/dist/server.d.ts +0 -48
  38. package/dist/server.js +0 -54
  39. package/dist/style-downloader.cjs +0 -312
  40. package/dist/style-downloader.d.cts +0 -120
  41. package/dist/style-downloader.d.ts +0 -120
  42. package/dist/style-downloader.js +0 -288
  43. package/dist/tile-downloader.cjs +0 -158
  44. package/dist/tile-downloader.d.cts +0 -84
  45. package/dist/tile-downloader.d.ts +0 -84
  46. package/dist/tile-downloader.js +0 -126
  47. package/dist/types-yLQy3AKR.d.cts +0 -192
  48. package/dist/types-yLQy3AKR.d.ts +0 -192
  49. package/dist/utils/errors.cjs +0 -41
  50. package/dist/utils/errors.d.cts +0 -18
  51. package/dist/utils/errors.d.ts +0 -18
  52. package/dist/utils/errors.js +0 -16
  53. package/dist/utils/fetch.cjs +0 -96
  54. package/dist/utils/fetch.d.cts +0 -51
  55. package/dist/utils/fetch.d.ts +0 -51
  56. package/dist/utils/fetch.js +0 -62
  57. package/dist/utils/file-formats.cjs +0 -98
  58. package/dist/utils/file-formats.d.cts +0 -35
  59. package/dist/utils/file-formats.d.ts +0 -35
  60. package/dist/utils/file-formats.js +0 -62
  61. package/dist/utils/geo.cjs +0 -84
  62. package/dist/utils/geo.d.cts +0 -46
  63. package/dist/utils/geo.d.ts +0 -46
  64. package/dist/utils/geo.js +0 -56
  65. package/dist/utils/mapbox.cjs +0 -121
  66. package/dist/utils/mapbox.d.cts +0 -43
  67. package/dist/utils/mapbox.d.ts +0 -43
  68. package/dist/utils/mapbox.js +0 -91
  69. package/dist/utils/misc.cjs +0 -39
  70. package/dist/utils/misc.d.cts +0 -22
  71. package/dist/utils/misc.d.ts +0 -22
  72. package/dist/utils/misc.js +0 -13
  73. package/dist/utils/streams.cjs +0 -130
  74. package/dist/utils/streams.d.cts +0 -73
  75. package/dist/utils/streams.d.ts +0 -73
  76. package/dist/utils/streams.js +0 -103
  77. package/dist/utils/style.cjs +0 -126
  78. package/dist/utils/style.d.cts +0 -69
  79. package/dist/utils/style.d.ts +0 -69
  80. package/dist/utils/style.js +0 -98
  81. package/dist/utils/templates.cjs +0 -118
  82. package/dist/utils/templates.d.cts +0 -80
  83. package/dist/utils/templates.d.ts +0 -80
  84. package/dist/utils/templates.js +0 -81
  85. package/dist/writer.cjs +0 -449
  86. package/dist/writer.d.cts +0 -7
  87. package/dist/writer.d.ts +0 -7
  88. package/dist/writer.js +0 -424
  89. package/node_modules/@node-rs/crc32/LICENSE +0 -21
  90. package/node_modules/@node-rs/crc32/README.md +0 -61
  91. package/node_modules/@node-rs/crc32/browser.js +0 -1
  92. package/node_modules/@node-rs/crc32/index.d.ts +0 -5
  93. package/node_modules/@node-rs/crc32/index.js +0 -368
  94. package/node_modules/@node-rs/crc32/package.json +0 -97
  95. package/node_modules/@node-rs/crc32-linux-x64-gnu/README.md +0 -3
  96. package/node_modules/@node-rs/crc32-linux-x64-gnu/crc32.linux-x64-gnu.node +0 -0
  97. package/node_modules/@node-rs/crc32-linux-x64-gnu/package.json +0 -43
  98. package/node_modules/@node-rs/crc32-linux-x64-musl/README.md +0 -3
  99. package/node_modules/@node-rs/crc32-linux-x64-musl/crc32.linux-x64-musl.node +0 -0
  100. package/node_modules/@node-rs/crc32-linux-x64-musl/package.json +0 -43
  101. package/node_modules/define-data-property/.eslintrc +0 -24
  102. package/node_modules/define-data-property/.github/FUNDING.yml +0 -12
  103. package/node_modules/define-data-property/.nycrc +0 -13
  104. package/node_modules/define-data-property/CHANGELOG.md +0 -70
  105. package/node_modules/define-data-property/LICENSE +0 -21
  106. package/node_modules/define-data-property/README.md +0 -67
  107. package/node_modules/define-data-property/index.d.ts +0 -12
  108. package/node_modules/define-data-property/index.js +0 -56
  109. package/node_modules/define-data-property/package.json +0 -106
  110. package/node_modules/define-data-property/test/index.js +0 -392
  111. package/node_modules/define-data-property/tsconfig.json +0 -59
  112. package/node_modules/define-properties/.editorconfig +0 -13
  113. package/node_modules/define-properties/.eslintrc +0 -19
  114. package/node_modules/define-properties/.github/FUNDING.yml +0 -12
  115. package/node_modules/define-properties/.nycrc +0 -9
  116. package/node_modules/define-properties/CHANGELOG.md +0 -91
  117. package/node_modules/define-properties/LICENSE +0 -21
  118. package/node_modules/define-properties/README.md +0 -84
  119. package/node_modules/define-properties/index.js +0 -47
  120. package/node_modules/define-properties/package.json +0 -88
  121. package/node_modules/es-define-property/.eslintrc +0 -13
  122. package/node_modules/es-define-property/.github/FUNDING.yml +0 -12
  123. package/node_modules/es-define-property/.nycrc +0 -9
  124. package/node_modules/es-define-property/CHANGELOG.md +0 -29
  125. package/node_modules/es-define-property/LICENSE +0 -21
  126. package/node_modules/es-define-property/README.md +0 -49
  127. package/node_modules/es-define-property/index.d.ts +0 -3
  128. package/node_modules/es-define-property/index.js +0 -14
  129. package/node_modules/es-define-property/package.json +0 -81
  130. package/node_modules/es-define-property/test/index.js +0 -56
  131. package/node_modules/es-define-property/tsconfig.json +0 -10
  132. package/node_modules/es-errors/.eslintrc +0 -5
  133. package/node_modules/es-errors/.github/FUNDING.yml +0 -12
  134. package/node_modules/es-errors/CHANGELOG.md +0 -40
  135. package/node_modules/es-errors/LICENSE +0 -21
  136. package/node_modules/es-errors/README.md +0 -55
  137. package/node_modules/es-errors/eval.d.ts +0 -3
  138. package/node_modules/es-errors/eval.js +0 -4
  139. package/node_modules/es-errors/index.d.ts +0 -3
  140. package/node_modules/es-errors/index.js +0 -4
  141. package/node_modules/es-errors/package.json +0 -80
  142. package/node_modules/es-errors/range.d.ts +0 -3
  143. package/node_modules/es-errors/range.js +0 -4
  144. package/node_modules/es-errors/ref.d.ts +0 -3
  145. package/node_modules/es-errors/ref.js +0 -4
  146. package/node_modules/es-errors/syntax.d.ts +0 -3
  147. package/node_modules/es-errors/syntax.js +0 -4
  148. package/node_modules/es-errors/test/index.js +0 -19
  149. package/node_modules/es-errors/tsconfig.json +0 -49
  150. package/node_modules/es-errors/type.d.ts +0 -3
  151. package/node_modules/es-errors/type.js +0 -4
  152. package/node_modules/es-errors/uri.d.ts +0 -3
  153. package/node_modules/es-errors/uri.js +0 -4
  154. package/node_modules/globalthis/.eslintrc +0 -18
  155. package/node_modules/globalthis/.nycrc +0 -10
  156. package/node_modules/globalthis/CHANGELOG.md +0 -109
  157. package/node_modules/globalthis/LICENSE +0 -21
  158. package/node_modules/globalthis/README.md +0 -70
  159. package/node_modules/globalthis/auto.js +0 -3
  160. package/node_modules/globalthis/implementation.browser.js +0 -11
  161. package/node_modules/globalthis/implementation.js +0 -3
  162. package/node_modules/globalthis/index.js +0 -19
  163. package/node_modules/globalthis/package.json +0 -99
  164. package/node_modules/globalthis/polyfill.js +0 -10
  165. package/node_modules/globalthis/shim.js +0 -29
  166. package/node_modules/globalthis/test/implementation.js +0 -11
  167. package/node_modules/globalthis/test/index.js +0 -11
  168. package/node_modules/globalthis/test/native.js +0 -26
  169. package/node_modules/globalthis/test/shimmed.js +0 -29
  170. package/node_modules/globalthis/test/tests.js +0 -36
  171. package/node_modules/gopd/.eslintrc +0 -16
  172. package/node_modules/gopd/.github/FUNDING.yml +0 -12
  173. package/node_modules/gopd/CHANGELOG.md +0 -45
  174. package/node_modules/gopd/LICENSE +0 -21
  175. package/node_modules/gopd/README.md +0 -40
  176. package/node_modules/gopd/gOPD.d.ts +0 -1
  177. package/node_modules/gopd/gOPD.js +0 -4
  178. package/node_modules/gopd/index.d.ts +0 -5
  179. package/node_modules/gopd/index.js +0 -15
  180. package/node_modules/gopd/package.json +0 -77
  181. package/node_modules/gopd/test/index.js +0 -36
  182. package/node_modules/gopd/tsconfig.json +0 -9
  183. package/node_modules/has-property-descriptors/.eslintrc +0 -13
  184. package/node_modules/has-property-descriptors/.github/FUNDING.yml +0 -12
  185. package/node_modules/has-property-descriptors/.nycrc +0 -9
  186. package/node_modules/has-property-descriptors/CHANGELOG.md +0 -35
  187. package/node_modules/has-property-descriptors/LICENSE +0 -21
  188. package/node_modules/has-property-descriptors/README.md +0 -43
  189. package/node_modules/has-property-descriptors/index.js +0 -22
  190. package/node_modules/has-property-descriptors/package.json +0 -77
  191. package/node_modules/has-property-descriptors/test/index.js +0 -57
  192. package/node_modules/is-it-type/License +0 -19
  193. package/node_modules/is-it-type/README.md +0 -102
  194. package/node_modules/is-it-type/changelog.md +0 -239
  195. package/node_modules/is-it-type/dist/cjs/is-it-type.js +0 -173
  196. package/node_modules/is-it-type/dist/cjs/is-it-type.js.map +0 -1
  197. package/node_modules/is-it-type/dist/cjs/is-it-type.min.js +0 -2
  198. package/node_modules/is-it-type/dist/cjs/is-it-type.min.js.map +0 -1
  199. package/node_modules/is-it-type/dist/esm/is-it-type.js +0 -143
  200. package/node_modules/is-it-type/dist/esm/is-it-type.js.map +0 -1
  201. package/node_modules/is-it-type/dist/esm/is-it-type.min.js +0 -2
  202. package/node_modules/is-it-type/dist/esm/is-it-type.min.js.map +0 -1
  203. package/node_modules/is-it-type/dist/esm/package.json +0 -3
  204. package/node_modules/is-it-type/dist/umd/is-it-type.js +0 -450
  205. package/node_modules/is-it-type/dist/umd/is-it-type.js.map +0 -1
  206. package/node_modules/is-it-type/dist/umd/is-it-type.min.js +0 -2
  207. package/node_modules/is-it-type/dist/umd/is-it-type.min.js.map +0 -1
  208. package/node_modules/is-it-type/es/index.js +0 -8
  209. package/node_modules/is-it-type/es/package.json +0 -3
  210. package/node_modules/is-it-type/index.js +0 -10
  211. package/node_modules/is-it-type/package.json +0 -87
  212. package/node_modules/is-it-type/src/index.js +0 -169
  213. package/node_modules/object-keys/.editorconfig +0 -13
  214. package/node_modules/object-keys/.eslintrc +0 -17
  215. package/node_modules/object-keys/.travis.yml +0 -277
  216. package/node_modules/object-keys/CHANGELOG.md +0 -232
  217. package/node_modules/object-keys/LICENSE +0 -21
  218. package/node_modules/object-keys/README.md +0 -76
  219. package/node_modules/object-keys/implementation.js +0 -122
  220. package/node_modules/object-keys/index.js +0 -32
  221. package/node_modules/object-keys/isArguments.js +0 -17
  222. package/node_modules/object-keys/package.json +0 -88
  223. package/node_modules/object-keys/test/index.js +0 -5
  224. package/node_modules/simple-invariant/License +0 -19
  225. package/node_modules/simple-invariant/README.md +0 -64
  226. package/node_modules/simple-invariant/changelog.md +0 -31
  227. package/node_modules/simple-invariant/index.js +0 -19
  228. package/node_modules/simple-invariant/package.json +0 -50
  229. package/node_modules/yauzl-promise/License +0 -19
  230. package/node_modules/yauzl-promise/README.md +0 -440
  231. package/node_modules/yauzl-promise/index.js +0 -10
  232. package/node_modules/yauzl-promise/lib/entry.js +0 -312
  233. package/node_modules/yauzl-promise/lib/index.js +0 -160
  234. package/node_modules/yauzl-promise/lib/reader.js +0 -289
  235. package/node_modules/yauzl-promise/lib/shared.js +0 -20
  236. package/node_modules/yauzl-promise/lib/utils.js +0 -105
  237. package/node_modules/yauzl-promise/lib/zip.js +0 -1224
  238. package/node_modules/yauzl-promise/package.json +0 -56
@@ -1,59 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- /* Visit https://aka.ms/tsconfig to read more about this file */
4
-
5
- /* Projects */
6
-
7
- /* Language and Environment */
8
- "target": "es2022", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
9
- // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
10
- // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
11
- "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
12
- // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
13
-
14
- /* Modules */
15
- "module": "commonjs", /* Specify what module code is generated. */
16
- // "rootDir": "./", /* Specify the root folder within your source files. */
17
- // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */
18
- // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
19
- // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
20
- // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
21
- "typeRoots": ["types"], /* Specify multiple folders that act like './node_modules/@types'. */
22
- "resolveJsonModule": true, /* Enable importing .json files. */
23
-
24
- /* JavaScript Support */
25
- "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
26
- "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
27
- "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
28
-
29
- /* Emit */
30
- "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
31
- "declarationMap": true, /* Create sourcemaps for d.ts files. */
32
- // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
33
- "noEmit": true, /* Disable emitting files from a compilation. */
34
-
35
- /* Interop Constraints */
36
- "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
37
- "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
38
- "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
39
-
40
- /* Type Checking */
41
- "strict": true, /* Enable all strict type-checking options. */
42
- "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
43
- "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
44
- "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
45
- "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */
46
- "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */
47
- "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
48
- "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
49
- "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
50
- "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
51
- // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
52
-
53
- /* Completeness */
54
- // "skipLibCheck": true /* Skip type checking all .d.ts files. */
55
- },
56
- "exclude": [
57
- "coverage"
58
- ]
59
- }
@@ -1,13 +0,0 @@
1
- root = true
2
-
3
- [*]
4
- indent_style = tab;
5
- insert_final_newline = true;
6
- quote_type = auto;
7
- space_after_anonymous_functions = true;
8
- space_after_control_statements = true;
9
- spaces_around_operators = true;
10
- trim_trailing_whitespace = true;
11
- spaces_in_brackets = false;
12
- end_of_line = lf;
13
-
@@ -1,19 +0,0 @@
1
- {
2
- "root": true,
3
-
4
- "extends": "@ljharb",
5
-
6
- "rules": {
7
- "id-length": [2, { "min": 1, "max": 35 }],
8
- "max-params": [2, 4],
9
- },
10
-
11
- "overrides": [
12
- {
13
- "files": "test/**",
14
- "rules": {
15
- "max-lines-per-function": 0,
16
- },
17
- },
18
- ],
19
- }
@@ -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/define-properties
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,9 +0,0 @@
1
- {
2
- "all": true,
3
- "check-coverage": false,
4
- "reporter": ["text-summary", "text", "html", "json"],
5
- "exclude": [
6
- "coverage",
7
- "test"
8
- ]
9
- }
@@ -1,91 +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.2.1](https://github.com/ljharb/define-properties/compare/v1.2.0...v1.2.1) - 2023-09-12
9
-
10
- ### Commits
11
-
12
- - [Refactor] use `define-data-property` [`e7782a7`](https://github.com/ljharb/define-properties/commit/e7782a7480a62f8b6e141b49371e6de4df176c97)
13
- - [actions] use reusable rebase action [`cd249c3`](https://github.com/ljharb/define-properties/commit/cd249c3920607bc8eeb7c0cd5b672b810983cac5)
14
- - [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`8205f97`](https://github.com/ljharb/define-properties/commit/8205f9734a4da8ee5b3b29798788567a09b330e8)
15
-
16
- ## [v1.2.0](https://github.com/ljharb/define-properties/compare/v1.1.4...v1.2.0) - 2023-02-10
17
-
18
- ### Commits
19
-
20
- - [New] if the predicate is boolean `true`, it compares the existing value with `===` as the predicate [`d8dd6fc`](https://github.com/ljharb/define-properties/commit/d8dd6fca40d7c5878a4b643b91e66ae5a513a194)
21
- - [meta] add `auto-changelog` [`7ebe2b0`](https://github.com/ljharb/define-properties/commit/7ebe2b0a0f90e62b842942cd45e86864fe75d9f6)
22
- - [meta] use `npmignore` to autogenerate an npmignore file [`647478a`](https://github.com/ljharb/define-properties/commit/647478a8401fbf053fb633c0a3a7c982da6bad74)
23
- - [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`e620d70`](https://github.com/ljharb/define-properties/commit/e620d707d2e1118a38796f22a862200eb0a53fff)
24
- - [Dev Deps] update `aud`, `tape` [`f1e5072`](https://github.com/ljharb/define-properties/commit/f1e507225c2551a99ed4fe40d3fe71b0f44acf88)
25
- - [actions] update checkout action [`628b3af`](https://github.com/ljharb/define-properties/commit/628b3af5c74b8f0963296d811a8f6fa657baf964)
26
-
27
- <!-- auto-changelog-above -->
28
-
29
- 1.1.4 / 2022-04-14
30
- =================
31
- * [Refactor] use `has-property-descriptors`
32
- * [readme] add github actions/codecov badges
33
- * [Docs] fix header parsing; remove testling
34
- * [Deps] update `object-keys`
35
- * [meta] use `prepublishOnly` script for npm 7+
36
- * [meta] add `funding` field; create FUNDING.yml
37
- * [actions] add "Allow Edits" workflow; automatic rebasing / merge commit blocking
38
- * [actions] reuse common workflows
39
- * [actions] update codecov uploader
40
- * [actions] use `node/install` instead of `node/run`; use `codecov` action
41
- * [Tests] migrate tests to Github Actions
42
- * [Tests] run `nyc` on all tests; use `tape` runner
43
- * [Tests] use shared travis-ci config
44
- * [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops
45
- * [Tests] remove `jscs`
46
- * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `tape`; add `aud`, `safe-publish-latest`
47
-
48
- 1.1.3 / 2018-08-14
49
- =================
50
- * [Refactor] use a for loop instead of `foreach` to make for smaller bundle sizes
51
- * [Robustness] cache `Array.prototype.concat` and `Object.defineProperty`
52
- * [Deps] update `object-keys`
53
- * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `nsp`, `tape`, `jscs`; remove unused eccheck script + dep
54
- * [Tests] use pretest/posttest for linting/security
55
- * [Tests] fix npm upgrades on older nodes
56
-
57
- 1.1.2 / 2015-10-14
58
- =================
59
- * [Docs] Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG
60
- * [Deps] Update `object-keys`
61
- * [Dev Deps] update `jscs`, `tape`, `eslint`, `@ljharb/eslint-config`, `nsp`
62
- * [Tests] up to `io.js` `v3.3`, `node` `v4.2`
63
-
64
- 1.1.1 / 2015-07-21
65
- =================
66
- * [Deps] Update `object-keys`
67
- * [Dev Deps] Update `tape`, `eslint`
68
- * [Tests] Test on `io.js` `v2.4`
69
-
70
- 1.1.0 / 2015-07-01
71
- =================
72
- * [New] Add support for symbol-valued properties.
73
- * [Dev Deps] Update `nsp`, `eslint`
74
- * [Tests] Test up to `io.js` `v2.3`
75
-
76
- 1.0.3 / 2015-05-30
77
- =================
78
- * Using a more reliable check for supported property descriptors.
79
-
80
- 1.0.2 / 2015-05-23
81
- =================
82
- * Test up to `io.js` `v2.0`
83
- * Update `tape`, `jscs`, `nsp`, `eslint`, `object-keys`, `editorconfig-tools`, `covert`
84
-
85
- 1.0.1 / 2015-01-06
86
- =================
87
- * Update `object-keys` to fix ES3 support
88
-
89
- 1.0.0 / 2015-01-04
90
- =================
91
- * v1.0.0
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (C) 2015 Jordan Harband
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
13
- all 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
21
- THE SOFTWARE.
@@ -1,84 +0,0 @@
1
- # define-properties <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
2
-
3
- [![github actions][actions-image]][actions-url]
4
- [![coverage][codecov-image]][codecov-url]
5
- [![dependency status][deps-svg]][deps-url]
6
- [![dev dependency status][dev-deps-svg]][dev-deps-url]
7
- [![License][license-image]][license-url]
8
- [![Downloads][downloads-image]][downloads-url]
9
-
10
- [![npm badge][npm-badge-png]][package-url]
11
-
12
- Define multiple non-enumerable properties at once. Uses `Object.defineProperty` when available; falls back to standard assignment in older engines.
13
- Existing properties are not overridden. Accepts a map of property names to a predicate that, when true, force-overrides.
14
-
15
- ## Example
16
-
17
- ```js
18
- var define = require('define-properties');
19
- var assert = require('assert');
20
-
21
- var obj = define({ a: 1, b: 2 }, {
22
- a: 10,
23
- b: 20,
24
- c: 30
25
- });
26
- assert(obj.a === 1);
27
- assert(obj.b === 2);
28
- assert(obj.c === 30);
29
- if (define.supportsDescriptors) {
30
- assert.deepEqual(Object.keys(obj), ['a', 'b']);
31
- assert.deepEqual(Object.getOwnPropertyDescriptor(obj, 'c'), {
32
- configurable: true,
33
- enumerable: false,
34
- value: 30,
35
- writable: false
36
- });
37
- }
38
- ```
39
-
40
- Then, with predicates:
41
- ```js
42
- var define = require('define-properties');
43
- var assert = require('assert');
44
-
45
- var obj = define({ a: 1, b: 2, c: 3 }, {
46
- a: 10,
47
- b: 20,
48
- c: 30
49
- }, {
50
- a: function () { return false; },
51
- b: function () { return true; }
52
- });
53
- assert(obj.a === 1);
54
- assert(obj.b === 20);
55
- assert(obj.c === 3);
56
- if (define.supportsDescriptors) {
57
- assert.deepEqual(Object.keys(obj), ['a', 'c']);
58
- assert.deepEqual(Object.getOwnPropertyDescriptor(obj, 'b'), {
59
- configurable: true,
60
- enumerable: false,
61
- value: 20,
62
- writable: false
63
- });
64
- }
65
- ```
66
-
67
- ## Tests
68
- Simply clone the repo, `npm install`, and run `npm test`
69
-
70
- [package-url]: https://npmjs.org/package/define-properties
71
- [npm-version-svg]: https://versionbadg.es/ljharb/define-properties.svg
72
- [deps-svg]: https://david-dm.org/ljharb/define-properties.svg
73
- [deps-url]: https://david-dm.org/ljharb/define-properties
74
- [dev-deps-svg]: https://david-dm.org/ljharb/define-properties/dev-status.svg
75
- [dev-deps-url]: https://david-dm.org/ljharb/define-properties#info=devDependencies
76
- [npm-badge-png]: https://nodei.co/npm/define-properties.png?downloads=true&stars=true
77
- [license-image]: https://img.shields.io/npm/l/define-properties.svg
78
- [license-url]: LICENSE
79
- [downloads-image]: https://img.shields.io/npm/dm/define-properties.svg
80
- [downloads-url]: https://npm-stat.com/charts.html?package=define-properties
81
- [codecov-image]: https://codecov.io/gh/ljharb/define-properties/branch/main/graphs/badge.svg
82
- [codecov-url]: https://app.codecov.io/gh/ljharb/define-properties/
83
- [actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/define-properties
84
- [actions-url]: https://github.com/ljharb/define-properties/actions
@@ -1,47 +0,0 @@
1
- 'use strict';
2
-
3
- var keys = require('object-keys');
4
- var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';
5
-
6
- var toStr = Object.prototype.toString;
7
- var concat = Array.prototype.concat;
8
- var defineDataProperty = require('define-data-property');
9
-
10
- var isFunction = function (fn) {
11
- return typeof fn === 'function' && toStr.call(fn) === '[object Function]';
12
- };
13
-
14
- var supportsDescriptors = require('has-property-descriptors')();
15
-
16
- var defineProperty = function (object, name, value, predicate) {
17
- if (name in object) {
18
- if (predicate === true) {
19
- if (object[name] === value) {
20
- return;
21
- }
22
- } else if (!isFunction(predicate) || !predicate()) {
23
- return;
24
- }
25
- }
26
-
27
- if (supportsDescriptors) {
28
- defineDataProperty(object, name, value, true);
29
- } else {
30
- defineDataProperty(object, name, value);
31
- }
32
- };
33
-
34
- var defineProperties = function (object, map) {
35
- var predicates = arguments.length > 2 ? arguments[2] : {};
36
- var props = keys(map);
37
- if (hasSymbols) {
38
- props = concat.call(props, Object.getOwnPropertySymbols(map));
39
- }
40
- for (var i = 0; i < props.length; i += 1) {
41
- defineProperty(object, props[i], map[props[i]], predicates[props[i]]);
42
- }
43
- };
44
-
45
- defineProperties.supportsDescriptors = !!supportsDescriptors;
46
-
47
- module.exports = defineProperties;
@@ -1,88 +0,0 @@
1
- {
2
- "name": "define-properties",
3
- "version": "1.2.1",
4
- "author": "Jordan Harband <ljharb@gmail.com>",
5
- "funding": {
6
- "url": "https://github.com/sponsors/ljharb"
7
- },
8
- "description": "Define multiple non-enumerable properties at once. Uses `Object.defineProperty` when available; falls back to standard assignment in older engines.",
9
- "license": "MIT",
10
- "main": "index.js",
11
- "scripts": {
12
- "prepack": "npmignore --auto --commentLines=autogenerated",
13
- "prepublish": "not-in-publish || npm run prepublishOnly",
14
- "prepublishOnly": "safe-publish-latest",
15
- "pretest": "npm run lint",
16
- "test": "npm run tests-only",
17
- "posttest": "aud --production",
18
- "tests-only": "nyc tape 'test/**/*.js'",
19
- "lint": "eslint --ext=js,mjs .",
20
- "version": "auto-changelog && git add CHANGELOG.md",
21
- "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
22
- },
23
- "repository": {
24
- "type": "git",
25
- "url": "git://github.com/ljharb/define-properties.git"
26
- },
27
- "keywords": [
28
- "Object.defineProperty",
29
- "Object.defineProperties",
30
- "object",
31
- "property descriptor",
32
- "descriptor",
33
- "define",
34
- "ES5"
35
- ],
36
- "dependencies": {
37
- "define-data-property": "^1.0.1",
38
- "has-property-descriptors": "^1.0.0",
39
- "object-keys": "^1.1.1"
40
- },
41
- "devDependencies": {
42
- "@ljharb/eslint-config": "^21.1.0",
43
- "aud": "^2.0.3",
44
- "auto-changelog": "^2.4.0",
45
- "eslint": "=8.8.0",
46
- "in-publish": "^2.0.1",
47
- "npmignore": "^0.3.0",
48
- "nyc": "^10.3.2",
49
- "safe-publish-latest": "^2.0.0",
50
- "tape": "^5.6.6"
51
- },
52
- "testling": {
53
- "files": "test/index.js",
54
- "browsers": [
55
- "iexplore/6.0..latest",
56
- "firefox/3.0..6.0",
57
- "firefox/15.0..latest",
58
- "firefox/nightly",
59
- "chrome/4.0..10.0",
60
- "chrome/20.0..latest",
61
- "chrome/canary",
62
- "opera/10.0..latest",
63
- "opera/next",
64
- "safari/4.0..latest",
65
- "ipad/6.0..latest",
66
- "iphone/6.0..latest",
67
- "android-browser/4.2"
68
- ]
69
- },
70
- "engines": {
71
- "node": ">= 0.4"
72
- },
73
- "auto-changelog": {
74
- "output": "CHANGELOG.md",
75
- "template": "keepachangelog",
76
- "unreleased": false,
77
- "commitLimit": false,
78
- "backfillLimit": false,
79
- "hideCredit": true,
80
- "startingVersion": "1.1.5"
81
- },
82
- "publishConfig": {
83
- "ignore": [
84
- ".github/workflows",
85
- "test/"
86
- ]
87
- }
88
- }
@@ -1,13 +0,0 @@
1
- {
2
- "root": true,
3
-
4
- "extends": "@ljharb",
5
-
6
- "rules": {
7
- "new-cap": ["error", {
8
- "capIsNewExceptions": [
9
- "GetIntrinsic",
10
- ],
11
- }],
12
- },
13
- }
@@ -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/es-define-property
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 a single custom sponsorship URL
@@ -1,9 +0,0 @@
1
- {
2
- "all": true,
3
- "check-coverage": false,
4
- "reporter": ["text-summary", "text", "html", "json"],
5
- "exclude": [
6
- "coverage",
7
- "test"
8
- ]
9
- }
@@ -1,29 +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.0.1](https://github.com/ljharb/es-define-property/compare/v1.0.0...v1.0.1) - 2024-12-06
9
-
10
- ### Commits
11
-
12
- - [types] use shared tsconfig [`954a663`](https://github.com/ljharb/es-define-property/commit/954a66360326e508a0e5daa4b07493d58f5e110e)
13
- - [actions] split out node 10-20, and 20+ [`3a8e84b`](https://github.com/ljharb/es-define-property/commit/3a8e84b23883f26ff37b3e82ff283834228e18c6)
14
- - [Dev Deps] update `@ljharb/eslint-config`, `@ljharb/tsconfig`, `@types/get-intrinsic`, `@types/tape`, `auto-changelog`, `gopd`, `tape` [`86ae27b`](https://github.com/ljharb/es-define-property/commit/86ae27bb8cc857b23885136fad9cbe965ae36612)
15
- - [Refactor] avoid using `get-intrinsic` [`02480c0`](https://github.com/ljharb/es-define-property/commit/02480c0353ef6118965282977c3864aff53d98b1)
16
- - [Tests] replace `aud` with `npm audit` [`f6093ff`](https://github.com/ljharb/es-define-property/commit/f6093ff74ab51c98015c2592cd393bd42478e773)
17
- - [Tests] configure testling [`7139e66`](https://github.com/ljharb/es-define-property/commit/7139e66959247a56086d9977359caef27c6849e7)
18
- - [Dev Deps] update `tape` [`b901b51`](https://github.com/ljharb/es-define-property/commit/b901b511a75e001a40ce1a59fef7d9ffcfc87482)
19
- - [Tests] fix types in tests [`469d269`](https://github.com/ljharb/es-define-property/commit/469d269fd141b1e773ec053a9fa35843493583e0)
20
- - [Dev Deps] add missing peer dep [`733acfb`](https://github.com/ljharb/es-define-property/commit/733acfb0c4c96edf337e470b89a25a5b3724c352)
21
-
22
- ## v1.0.0 - 2024-02-12
23
-
24
- ### Commits
25
-
26
- - Initial implementation, tests, readme, types [`3e154e1`](https://github.com/ljharb/es-define-property/commit/3e154e11a2fee09127220f5e503bf2c0a31dd480)
27
- - Initial commit [`07d98de`](https://github.com/ljharb/es-define-property/commit/07d98de34a4dc31ff5e83a37c0c3f49e0d85cd50)
28
- - npm init [`c4eb634`](https://github.com/ljharb/es-define-property/commit/c4eb6348b0d3886aac36cef34ad2ee0665ea6f3e)
29
- - Only apps should have lockfiles [`7af86ec`](https://github.com/ljharb/es-define-property/commit/7af86ec1d311ec0b17fdfe616a25f64276903856)
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2024 Jordan Harband
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,49 +0,0 @@
1
- # es-define-property <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
- `Object.defineProperty`, but not IE 8's broken one.
11
-
12
- ## Example
13
-
14
- ```js
15
- const assert = require('assert');
16
-
17
- const $defineProperty = require('es-define-property');
18
-
19
- if ($defineProperty) {
20
- assert.equal($defineProperty, Object.defineProperty);
21
- } else if (Object.defineProperty) {
22
- assert.equal($defineProperty, false, 'this is IE 8');
23
- } else {
24
- assert.equal($defineProperty, false, 'this is an ES3 engine');
25
- }
26
- ```
27
-
28
- ## Tests
29
- Simply clone the repo, `npm install`, and run `npm test`
30
-
31
- ## Security
32
-
33
- Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report.
34
-
35
- [package-url]: https://npmjs.org/package/es-define-property
36
- [npm-version-svg]: https://versionbadg.es/ljharb/es-define-property.svg
37
- [deps-svg]: https://david-dm.org/ljharb/es-define-property.svg
38
- [deps-url]: https://david-dm.org/ljharb/es-define-property
39
- [dev-deps-svg]: https://david-dm.org/ljharb/es-define-property/dev-status.svg
40
- [dev-deps-url]: https://david-dm.org/ljharb/es-define-property#info=devDependencies
41
- [npm-badge-png]: https://nodei.co/npm/es-define-property.png?downloads=true&stars=true
42
- [license-image]: https://img.shields.io/npm/l/es-define-property.svg
43
- [license-url]: LICENSE
44
- [downloads-image]: https://img.shields.io/npm/dm/es-define-property.svg
45
- [downloads-url]: https://npm-stat.com/charts.html?package=es-define-property
46
- [codecov-image]: https://codecov.io/gh/ljharb/es-define-property/branch/main/graphs/badge.svg
47
- [codecov-url]: https://app.codecov.io/gh/ljharb/es-define-property/
48
- [actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/es-define-property
49
- [actions-url]: https://github.com/ljharb/es-define-property/actions
@@ -1,3 +0,0 @@
1
- declare const defineProperty: false | typeof Object.defineProperty;
2
-
3
- export = defineProperty;
@@ -1,14 +0,0 @@
1
- 'use strict';
2
-
3
- /** @type {import('.')} */
4
- var $defineProperty = Object.defineProperty || false;
5
- if ($defineProperty) {
6
- try {
7
- $defineProperty({}, 'a', { value: 1 });
8
- } catch (e) {
9
- // IE 8 has a broken defineProperty
10
- $defineProperty = false;
11
- }
12
- }
13
-
14
- module.exports = $defineProperty;