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.
- package/README.md +47 -7
- package/bin/smp-download.js +27 -151
- package/bin/smp-mbtiles.js +12 -7
- package/bin/smp-view.js +32 -54
- package/lib/commands/download.js +188 -0
- package/lib/commands/mbtiles.js +21 -0
- package/lib/commands/view.js +57 -0
- package/lib/reporters.js +92 -0
- package/package.json +9 -181
- package/LICENSE.md +0 -7
- package/dist/download.cjs +0 -101
- package/dist/download.d.cts +0 -65
- package/dist/download.d.ts +0 -65
- package/dist/download.js +0 -77
- package/dist/from-mbtiles.cjs +0 -91
- package/dist/from-mbtiles.d.cts +0 -17
- package/dist/from-mbtiles.d.ts +0 -17
- package/dist/from-mbtiles.js +0 -57
- package/dist/index.cjs +0 -49
- package/dist/index.d.cts +0 -27
- package/dist/index.d.ts +0 -27
- package/dist/index.js +0 -18
- package/dist/reader-watch.cjs +0 -135
- package/dist/reader-watch.d.cts +0 -24
- package/dist/reader-watch.d.ts +0 -24
- package/dist/reader-watch.js +0 -101
- package/dist/reader.cjs +0 -168
- package/dist/reader.d.cts +0 -62
- package/dist/reader.d.ts +0 -62
- package/dist/reader.js +0 -139
- package/dist/reporters.cjs +0 -122
- package/dist/reporters.d.cts +0 -10
- package/dist/reporters.d.ts +0 -10
- package/dist/reporters.js +0 -88
- package/dist/server.cjs +0 -78
- package/dist/server.d.cts +0 -48
- package/dist/server.d.ts +0 -48
- package/dist/server.js +0 -54
- package/dist/style-downloader.cjs +0 -312
- package/dist/style-downloader.d.cts +0 -120
- package/dist/style-downloader.d.ts +0 -120
- package/dist/style-downloader.js +0 -288
- package/dist/tile-downloader.cjs +0 -158
- package/dist/tile-downloader.d.cts +0 -84
- package/dist/tile-downloader.d.ts +0 -84
- package/dist/tile-downloader.js +0 -126
- package/dist/types-yLQy3AKR.d.cts +0 -192
- package/dist/types-yLQy3AKR.d.ts +0 -192
- package/dist/utils/errors.cjs +0 -41
- package/dist/utils/errors.d.cts +0 -18
- package/dist/utils/errors.d.ts +0 -18
- package/dist/utils/errors.js +0 -16
- package/dist/utils/fetch.cjs +0 -96
- package/dist/utils/fetch.d.cts +0 -51
- package/dist/utils/fetch.d.ts +0 -51
- package/dist/utils/fetch.js +0 -62
- package/dist/utils/file-formats.cjs +0 -98
- package/dist/utils/file-formats.d.cts +0 -35
- package/dist/utils/file-formats.d.ts +0 -35
- package/dist/utils/file-formats.js +0 -62
- package/dist/utils/geo.cjs +0 -84
- package/dist/utils/geo.d.cts +0 -46
- package/dist/utils/geo.d.ts +0 -46
- package/dist/utils/geo.js +0 -56
- package/dist/utils/mapbox.cjs +0 -121
- package/dist/utils/mapbox.d.cts +0 -43
- package/dist/utils/mapbox.d.ts +0 -43
- package/dist/utils/mapbox.js +0 -91
- package/dist/utils/misc.cjs +0 -39
- package/dist/utils/misc.d.cts +0 -22
- package/dist/utils/misc.d.ts +0 -22
- package/dist/utils/misc.js +0 -13
- package/dist/utils/streams.cjs +0 -130
- package/dist/utils/streams.d.cts +0 -73
- package/dist/utils/streams.d.ts +0 -73
- package/dist/utils/streams.js +0 -103
- package/dist/utils/style.cjs +0 -126
- package/dist/utils/style.d.cts +0 -69
- package/dist/utils/style.d.ts +0 -69
- package/dist/utils/style.js +0 -98
- package/dist/utils/templates.cjs +0 -118
- package/dist/utils/templates.d.cts +0 -80
- package/dist/utils/templates.d.ts +0 -80
- package/dist/utils/templates.js +0 -81
- package/dist/writer.cjs +0 -449
- package/dist/writer.d.cts +0 -7
- package/dist/writer.d.ts +0 -7
- package/dist/writer.js +0 -424
- package/node_modules/@node-rs/crc32/LICENSE +0 -21
- package/node_modules/@node-rs/crc32/README.md +0 -61
- package/node_modules/@node-rs/crc32/browser.js +0 -1
- package/node_modules/@node-rs/crc32/index.d.ts +0 -5
- package/node_modules/@node-rs/crc32/index.js +0 -368
- package/node_modules/@node-rs/crc32/package.json +0 -97
- package/node_modules/@node-rs/crc32-linux-x64-gnu/README.md +0 -3
- package/node_modules/@node-rs/crc32-linux-x64-gnu/crc32.linux-x64-gnu.node +0 -0
- package/node_modules/@node-rs/crc32-linux-x64-gnu/package.json +0 -43
- package/node_modules/@node-rs/crc32-linux-x64-musl/README.md +0 -3
- package/node_modules/@node-rs/crc32-linux-x64-musl/crc32.linux-x64-musl.node +0 -0
- package/node_modules/@node-rs/crc32-linux-x64-musl/package.json +0 -43
- 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/define-properties/.editorconfig +0 -13
- package/node_modules/define-properties/.eslintrc +0 -19
- package/node_modules/define-properties/.github/FUNDING.yml +0 -12
- package/node_modules/define-properties/.nycrc +0 -9
- package/node_modules/define-properties/CHANGELOG.md +0 -91
- package/node_modules/define-properties/LICENSE +0 -21
- package/node_modules/define-properties/README.md +0 -84
- package/node_modules/define-properties/index.js +0 -47
- package/node_modules/define-properties/package.json +0 -88
- 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/globalthis/.eslintrc +0 -18
- package/node_modules/globalthis/.nycrc +0 -10
- package/node_modules/globalthis/CHANGELOG.md +0 -109
- package/node_modules/globalthis/LICENSE +0 -21
- package/node_modules/globalthis/README.md +0 -70
- package/node_modules/globalthis/auto.js +0 -3
- package/node_modules/globalthis/implementation.browser.js +0 -11
- package/node_modules/globalthis/implementation.js +0 -3
- package/node_modules/globalthis/index.js +0 -19
- package/node_modules/globalthis/package.json +0 -99
- package/node_modules/globalthis/polyfill.js +0 -10
- package/node_modules/globalthis/shim.js +0 -29
- package/node_modules/globalthis/test/implementation.js +0 -11
- package/node_modules/globalthis/test/index.js +0 -11
- package/node_modules/globalthis/test/native.js +0 -26
- package/node_modules/globalthis/test/shimmed.js +0 -29
- package/node_modules/globalthis/test/tests.js +0 -36
- 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/is-it-type/License +0 -19
- package/node_modules/is-it-type/README.md +0 -102
- package/node_modules/is-it-type/changelog.md +0 -239
- package/node_modules/is-it-type/dist/cjs/is-it-type.js +0 -173
- package/node_modules/is-it-type/dist/cjs/is-it-type.js.map +0 -1
- package/node_modules/is-it-type/dist/cjs/is-it-type.min.js +0 -2
- package/node_modules/is-it-type/dist/cjs/is-it-type.min.js.map +0 -1
- package/node_modules/is-it-type/dist/esm/is-it-type.js +0 -143
- package/node_modules/is-it-type/dist/esm/is-it-type.js.map +0 -1
- package/node_modules/is-it-type/dist/esm/is-it-type.min.js +0 -2
- package/node_modules/is-it-type/dist/esm/is-it-type.min.js.map +0 -1
- package/node_modules/is-it-type/dist/esm/package.json +0 -3
- package/node_modules/is-it-type/dist/umd/is-it-type.js +0 -450
- package/node_modules/is-it-type/dist/umd/is-it-type.js.map +0 -1
- package/node_modules/is-it-type/dist/umd/is-it-type.min.js +0 -2
- package/node_modules/is-it-type/dist/umd/is-it-type.min.js.map +0 -1
- package/node_modules/is-it-type/es/index.js +0 -8
- package/node_modules/is-it-type/es/package.json +0 -3
- package/node_modules/is-it-type/index.js +0 -10
- package/node_modules/is-it-type/package.json +0 -87
- package/node_modules/is-it-type/src/index.js +0 -169
- 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/simple-invariant/License +0 -19
- package/node_modules/simple-invariant/README.md +0 -64
- package/node_modules/simple-invariant/changelog.md +0 -31
- package/node_modules/simple-invariant/index.js +0 -19
- package/node_modules/simple-invariant/package.json +0 -50
- package/node_modules/yauzl-promise/License +0 -19
- package/node_modules/yauzl-promise/README.md +0 -440
- package/node_modules/yauzl-promise/index.js +0 -10
- package/node_modules/yauzl-promise/lib/entry.js +0 -312
- package/node_modules/yauzl-promise/lib/index.js +0 -160
- package/node_modules/yauzl-promise/lib/reader.js +0 -289
- package/node_modules/yauzl-promise/lib/shared.js +0 -20
- package/node_modules/yauzl-promise/lib/utils.js +0 -105
- package/node_modules/yauzl-promise/lib/zip.js +0 -1224
- package/node_modules/yauzl-promise/package.json +0 -56
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
# gopd <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.getOwnPropertyDescriptor`, but accounts for IE's broken implementation.
|
|
11
|
-
|
|
12
|
-
## Usage
|
|
13
|
-
|
|
14
|
-
```javascript
|
|
15
|
-
var gOPD = require('gopd');
|
|
16
|
-
var assert = require('assert');
|
|
17
|
-
|
|
18
|
-
if (gOPD) {
|
|
19
|
-
assert.equal(typeof gOPD, 'function', 'descriptors supported');
|
|
20
|
-
// use gOPD like Object.getOwnPropertyDescriptor here
|
|
21
|
-
} else {
|
|
22
|
-
assert.ok(!gOPD, 'descriptors not supported');
|
|
23
|
-
}
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
[package-url]: https://npmjs.org/package/gopd
|
|
27
|
-
[npm-version-svg]: https://versionbadg.es/ljharb/gopd.svg
|
|
28
|
-
[deps-svg]: https://david-dm.org/ljharb/gopd.svg
|
|
29
|
-
[deps-url]: https://david-dm.org/ljharb/gopd
|
|
30
|
-
[dev-deps-svg]: https://david-dm.org/ljharb/gopd/dev-status.svg
|
|
31
|
-
[dev-deps-url]: https://david-dm.org/ljharb/gopd#info=devDependencies
|
|
32
|
-
[npm-badge-png]: https://nodei.co/npm/gopd.png?downloads=true&stars=true
|
|
33
|
-
[license-image]: https://img.shields.io/npm/l/gopd.svg
|
|
34
|
-
[license-url]: LICENSE
|
|
35
|
-
[downloads-image]: https://img.shields.io/npm/dm/gopd.svg
|
|
36
|
-
[downloads-url]: https://npm-stat.com/charts.html?package=gopd
|
|
37
|
-
[codecov-image]: https://codecov.io/gh/ljharb/gopd/branch/main/graphs/badge.svg
|
|
38
|
-
[codecov-url]: https://app.codecov.io/gh/ljharb/gopd/
|
|
39
|
-
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/gopd
|
|
40
|
-
[actions-url]: https://github.com/ljharb/gopd/actions
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export = Object.getOwnPropertyDescriptor;
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "gopd",
|
|
3
|
-
"version": "1.2.0",
|
|
4
|
-
"description": "`Object.getOwnPropertyDescriptor`, but accounts for IE's broken implementation.",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"exports": {
|
|
7
|
-
".": "./index.js",
|
|
8
|
-
"./gOPD": "./gOPD.js",
|
|
9
|
-
"./package.json": "./package.json"
|
|
10
|
-
},
|
|
11
|
-
"sideEffects": false,
|
|
12
|
-
"scripts": {
|
|
13
|
-
"prepack": "npmignore --auto --commentLines=autogenerated",
|
|
14
|
-
"prepublishOnly": "safe-publish-latest",
|
|
15
|
-
"prepublish": "not-in-publish || npm run prepublishOnly",
|
|
16
|
-
"prelint": "tsc -p . && attw -P",
|
|
17
|
-
"lint": "eslint --ext=js,mjs .",
|
|
18
|
-
"postlint": "evalmd README.md",
|
|
19
|
-
"pretest": "npm run lint",
|
|
20
|
-
"tests-only": "tape 'test/**/*.js'",
|
|
21
|
-
"test": "npm run tests-only",
|
|
22
|
-
"posttest": "npx npm@'>=10.2' audit --production",
|
|
23
|
-
"version": "auto-changelog && git add CHANGELOG.md",
|
|
24
|
-
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
|
|
25
|
-
},
|
|
26
|
-
"repository": {
|
|
27
|
-
"type": "git",
|
|
28
|
-
"url": "git+https://github.com/ljharb/gopd.git"
|
|
29
|
-
},
|
|
30
|
-
"keywords": [
|
|
31
|
-
"ecmascript",
|
|
32
|
-
"javascript",
|
|
33
|
-
"getownpropertydescriptor",
|
|
34
|
-
"property",
|
|
35
|
-
"descriptor"
|
|
36
|
-
],
|
|
37
|
-
"author": "Jordan Harband <ljharb@gmail.com>",
|
|
38
|
-
"funding": {
|
|
39
|
-
"url": "https://github.com/sponsors/ljharb"
|
|
40
|
-
},
|
|
41
|
-
"license": "MIT",
|
|
42
|
-
"bugs": {
|
|
43
|
-
"url": "https://github.com/ljharb/gopd/issues"
|
|
44
|
-
},
|
|
45
|
-
"homepage": "https://github.com/ljharb/gopd#readme",
|
|
46
|
-
"devDependencies": {
|
|
47
|
-
"@arethetypeswrong/cli": "^0.17.0",
|
|
48
|
-
"@ljharb/eslint-config": "^21.1.1",
|
|
49
|
-
"@ljharb/tsconfig": "^0.2.0",
|
|
50
|
-
"@types/tape": "^5.6.5",
|
|
51
|
-
"auto-changelog": "^2.5.0",
|
|
52
|
-
"encoding": "^0.1.13",
|
|
53
|
-
"eslint": "=8.8.0",
|
|
54
|
-
"evalmd": "^0.0.19",
|
|
55
|
-
"in-publish": "^2.0.1",
|
|
56
|
-
"npmignore": "^0.3.1",
|
|
57
|
-
"safe-publish-latest": "^2.0.0",
|
|
58
|
-
"tape": "^5.9.0",
|
|
59
|
-
"typescript": "next"
|
|
60
|
-
},
|
|
61
|
-
"auto-changelog": {
|
|
62
|
-
"output": "CHANGELOG.md",
|
|
63
|
-
"template": "keepachangelog",
|
|
64
|
-
"unreleased": false,
|
|
65
|
-
"commitLimit": false,
|
|
66
|
-
"backfillLimit": false,
|
|
67
|
-
"hideCredit": true
|
|
68
|
-
},
|
|
69
|
-
"publishConfig": {
|
|
70
|
-
"ignore": [
|
|
71
|
-
".github/workflows"
|
|
72
|
-
]
|
|
73
|
-
},
|
|
74
|
-
"engines": {
|
|
75
|
-
"node": ">= 0.4"
|
|
76
|
-
}
|
|
77
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var test = require('tape');
|
|
4
|
-
var gOPD = require('../');
|
|
5
|
-
|
|
6
|
-
test('gOPD', function (t) {
|
|
7
|
-
t.test('supported', { skip: !gOPD }, function (st) {
|
|
8
|
-
st.equal(typeof gOPD, 'function', 'is a function');
|
|
9
|
-
|
|
10
|
-
var obj = { x: 1 };
|
|
11
|
-
st.ok('x' in obj, 'property exists');
|
|
12
|
-
|
|
13
|
-
// @ts-expect-error TS can't figure out narrowing from `skip`
|
|
14
|
-
var desc = gOPD(obj, 'x');
|
|
15
|
-
st.deepEqual(
|
|
16
|
-
desc,
|
|
17
|
-
{
|
|
18
|
-
configurable: true,
|
|
19
|
-
enumerable: true,
|
|
20
|
-
value: 1,
|
|
21
|
-
writable: true
|
|
22
|
-
},
|
|
23
|
-
'descriptor is as expected'
|
|
24
|
-
);
|
|
25
|
-
|
|
26
|
-
st.end();
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
t.test('not supported', { skip: !!gOPD }, function (st) {
|
|
30
|
-
st.notOk(gOPD, 'is falsy');
|
|
31
|
-
|
|
32
|
-
st.end();
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
t.end();
|
|
36
|
-
});
|
|
@@ -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/has-property-descriptors
|
|
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,35 +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.2](https://github.com/inspect-js/has-property-descriptors/compare/v1.0.1...v1.0.2) - 2024-02-12
|
|
9
|
-
|
|
10
|
-
### Commits
|
|
11
|
-
|
|
12
|
-
- [Refactor] use `es-define-property` [`f93a8c8`](https://github.com/inspect-js/has-property-descriptors/commit/f93a8c85eba70cbceab500f2619fb5cce73a1805)
|
|
13
|
-
- [Dev Deps] update `aud`, `npmignore`, `tape` [`42b0c9d`](https://github.com/inspect-js/has-property-descriptors/commit/42b0c9d1c23e747755f0f2924923c418ea34a9ee)
|
|
14
|
-
- [Deps] update `get-intrinsic` [`35e9b46`](https://github.com/inspect-js/has-property-descriptors/commit/35e9b46a7f14331bf0de98b644dd803676746037)
|
|
15
|
-
|
|
16
|
-
## [v1.0.1](https://github.com/inspect-js/has-property-descriptors/compare/v1.0.0...v1.0.1) - 2023-10-20
|
|
17
|
-
|
|
18
|
-
### Commits
|
|
19
|
-
|
|
20
|
-
- [meta] use `npmignore` to autogenerate an npmignore file [`5bbf4da`](https://github.com/inspect-js/has-property-descriptors/commit/5bbf4dae1b58950d87bb3af508bee7513e640868)
|
|
21
|
-
- [actions] update rebase action to use reusable workflow [`3a5585b`](https://github.com/inspect-js/has-property-descriptors/commit/3a5585bf74988f71a8f59e67a07d594e62c51fd8)
|
|
22
|
-
- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`e5c1212`](https://github.com/inspect-js/has-property-descriptors/commit/e5c1212048a8fda549794c47863724ca60b89cae)
|
|
23
|
-
- [Dev Deps] update `aud`, `tape` [`e942917`](https://github.com/inspect-js/has-property-descriptors/commit/e942917b6c2f7c090d5623048989cf20d0834ebf)
|
|
24
|
-
- [Deps] update `get-intrinsic` [`f4a44ec`](https://github.com/inspect-js/has-property-descriptors/commit/f4a44ec6d94146fa6c550d3c15c31a2062c83ef4)
|
|
25
|
-
- [Deps] update `get-intrinsic` [`eeb275b`](https://github.com/inspect-js/has-property-descriptors/commit/eeb275b473e5d72ca843b61ca25cfcb06a5d4300)
|
|
26
|
-
|
|
27
|
-
## v1.0.0 - 2022-04-14
|
|
28
|
-
|
|
29
|
-
### Commits
|
|
30
|
-
|
|
31
|
-
- Initial implementation, tests [`303559f`](https://github.com/inspect-js/has-property-descriptors/commit/303559f2a72dfe7111573a1aec475ed4a184c35a)
|
|
32
|
-
- Initial commit [`3a7ca2d`](https://github.com/inspect-js/has-property-descriptors/commit/3a7ca2dc49f1fff0279a28bb16265e7615e14749)
|
|
33
|
-
- read me [`dd73dce`](https://github.com/inspect-js/has-property-descriptors/commit/dd73dce09d89d0f7a4a6e3b1e562a506f979a767)
|
|
34
|
-
- npm init [`c1e6557`](https://github.com/inspect-js/has-property-descriptors/commit/c1e655779de632d68cb944c50da6b71bcb7b8c85)
|
|
35
|
-
- Only apps should have lockfiles [`e72f7c6`](https://github.com/inspect-js/has-property-descriptors/commit/e72f7c68de534b2d273ee665f8b18d4ecc7f70b0)
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2022 Inspect JS
|
|
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,43 +0,0 @@
|
|
|
1
|
-
# has-property-descriptors <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
|
-
Does the environment have full property descriptor support? Handles IE 8's broken defineProperty/gOPD.
|
|
13
|
-
|
|
14
|
-
## Example
|
|
15
|
-
|
|
16
|
-
```js
|
|
17
|
-
var hasPropertyDescriptors = require('has-property-descriptors');
|
|
18
|
-
var assert = require('assert');
|
|
19
|
-
|
|
20
|
-
assert.equal(hasPropertyDescriptors(), true); // will be `false` in IE 6-8, and ES5 engines
|
|
21
|
-
|
|
22
|
-
// Arrays can not have their length `[[Defined]]` in some engines
|
|
23
|
-
assert.equal(hasPropertyDescriptors.hasArrayLengthDefineBug(), false); // will be `true` in Firefox 4-22, and node v0.6
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
## Tests
|
|
27
|
-
Simply clone the repo, `npm install`, and run `npm test`
|
|
28
|
-
|
|
29
|
-
[package-url]: https://npmjs.org/package/has-property-descriptors
|
|
30
|
-
[npm-version-svg]: https://versionbadg.es/inspect-js/has-property-descriptors.svg
|
|
31
|
-
[deps-svg]: https://david-dm.org/inspect-js/has-property-descriptors.svg
|
|
32
|
-
[deps-url]: https://david-dm.org/inspect-js/has-property-descriptors
|
|
33
|
-
[dev-deps-svg]: https://david-dm.org/inspect-js/has-property-descriptors/dev-status.svg
|
|
34
|
-
[dev-deps-url]: https://david-dm.org/inspect-js/has-property-descriptors#info=devDependencies
|
|
35
|
-
[npm-badge-png]: https://nodei.co/npm/has-property-descriptors.png?downloads=true&stars=true
|
|
36
|
-
[license-image]: https://img.shields.io/npm/l/has-property-descriptors.svg
|
|
37
|
-
[license-url]: LICENSE
|
|
38
|
-
[downloads-image]: https://img.shields.io/npm/dm/has-property-descriptors.svg
|
|
39
|
-
[downloads-url]: https://npm-stat.com/charts.html?package=has-property-descriptors
|
|
40
|
-
[codecov-image]: https://codecov.io/gh/inspect-js/has-property-descriptors/branch/main/graphs/badge.svg
|
|
41
|
-
[codecov-url]: https://app.codecov.io/gh/inspect-js/has-property-descriptors/
|
|
42
|
-
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/has-property-descriptors
|
|
43
|
-
[actions-url]: https://github.com/inspect-js/has-property-descriptors/actions
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var $defineProperty = require('es-define-property');
|
|
4
|
-
|
|
5
|
-
var hasPropertyDescriptors = function hasPropertyDescriptors() {
|
|
6
|
-
return !!$defineProperty;
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
|
|
10
|
-
// node v0.6 has a bug where array lengths can be Set but not Defined
|
|
11
|
-
if (!$defineProperty) {
|
|
12
|
-
return null;
|
|
13
|
-
}
|
|
14
|
-
try {
|
|
15
|
-
return $defineProperty([], 'length', { value: 1 }).length !== 1;
|
|
16
|
-
} catch (e) {
|
|
17
|
-
// In Firefox 4-22, defining length on an array throws an exception.
|
|
18
|
-
return true;
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
module.exports = hasPropertyDescriptors;
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "has-property-descriptors",
|
|
3
|
-
"version": "1.0.2",
|
|
4
|
-
"description": "Does the environment have full property descriptor support? Handles IE 8's broken defineProperty/gOPD.",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"exports": {
|
|
7
|
-
".": "./index.js",
|
|
8
|
-
"./package.json": "./package.json"
|
|
9
|
-
},
|
|
10
|
-
"sideEffects": false,
|
|
11
|
-
"scripts": {
|
|
12
|
-
"prepack": "npmignore --auto --commentLines=autogenerated",
|
|
13
|
-
"prepublishOnly": "safe-publish-latest",
|
|
14
|
-
"prepublish": "not-in-publish || npm run prepublishOnly",
|
|
15
|
-
"pretest": "npm run lint",
|
|
16
|
-
"prelint": "evalmd README.md",
|
|
17
|
-
"lint": "eslint --ext=js,mjs .",
|
|
18
|
-
"tests-only": "nyc tape 'test/**/*.js'",
|
|
19
|
-
"test": "npm run tests-only",
|
|
20
|
-
"posttest": "aud --production",
|
|
21
|
-
"version": "auto-changelog && git add CHANGELOG.md",
|
|
22
|
-
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
|
|
23
|
-
},
|
|
24
|
-
"repository": {
|
|
25
|
-
"type": "git",
|
|
26
|
-
"url": "git+https://github.com/inspect-js/has-property-descriptors.git"
|
|
27
|
-
},
|
|
28
|
-
"keywords": [
|
|
29
|
-
"property",
|
|
30
|
-
"descriptors",
|
|
31
|
-
"has",
|
|
32
|
-
"environment",
|
|
33
|
-
"env",
|
|
34
|
-
"defineProperty",
|
|
35
|
-
"getOwnPropertyDescriptor"
|
|
36
|
-
],
|
|
37
|
-
"author": "Jordan Harband <ljharb@gmail.com>",
|
|
38
|
-
"funding": {
|
|
39
|
-
"url": "https://github.com/sponsors/ljharb"
|
|
40
|
-
},
|
|
41
|
-
"license": "MIT",
|
|
42
|
-
"bugs": {
|
|
43
|
-
"url": "https://github.com/inspect-js/has-property-descriptors/issues"
|
|
44
|
-
},
|
|
45
|
-
"homepage": "https://github.com/inspect-js/has-property-descriptors#readme",
|
|
46
|
-
"devDependencies": {
|
|
47
|
-
"@ljharb/eslint-config": "^21.1.0",
|
|
48
|
-
"aud": "^2.0.4",
|
|
49
|
-
"auto-changelog": "^2.4.0",
|
|
50
|
-
"eslint": "=8.8.0",
|
|
51
|
-
"evalmd": "^0.0.19",
|
|
52
|
-
"in-publish": "^2.0.1",
|
|
53
|
-
"npmignore": "^0.3.1",
|
|
54
|
-
"nyc": "^10.3.2",
|
|
55
|
-
"safe-publish-latest": "^2.0.0",
|
|
56
|
-
"tape": "^5.7.4"
|
|
57
|
-
},
|
|
58
|
-
"dependencies": {
|
|
59
|
-
"es-define-property": "^1.0.0"
|
|
60
|
-
},
|
|
61
|
-
"testling": {
|
|
62
|
-
"files": "test/index.js"
|
|
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
|
-
}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var test = require('tape');
|
|
4
|
-
|
|
5
|
-
var hasPropertyDescriptors = require('../');
|
|
6
|
-
|
|
7
|
-
var sentinel = {};
|
|
8
|
-
|
|
9
|
-
test('hasPropertyDescriptors', function (t) {
|
|
10
|
-
t.equal(typeof hasPropertyDescriptors, 'function', 'is a function');
|
|
11
|
-
t.equal(typeof hasPropertyDescriptors.hasArrayLengthDefineBug, 'function', '`hasArrayLengthDefineBug` property is a function');
|
|
12
|
-
|
|
13
|
-
var yes = hasPropertyDescriptors();
|
|
14
|
-
t.test('property descriptors', { skip: !yes }, function (st) {
|
|
15
|
-
var o = { a: sentinel };
|
|
16
|
-
|
|
17
|
-
st.deepEqual(
|
|
18
|
-
Object.getOwnPropertyDescriptor(o, 'a'),
|
|
19
|
-
{
|
|
20
|
-
configurable: true,
|
|
21
|
-
enumerable: true,
|
|
22
|
-
value: sentinel,
|
|
23
|
-
writable: true
|
|
24
|
-
},
|
|
25
|
-
'has expected property descriptor'
|
|
26
|
-
);
|
|
27
|
-
|
|
28
|
-
Object.defineProperty(o, 'a', { enumerable: false, writable: false });
|
|
29
|
-
|
|
30
|
-
st.deepEqual(
|
|
31
|
-
Object.getOwnPropertyDescriptor(o, 'a'),
|
|
32
|
-
{
|
|
33
|
-
configurable: true,
|
|
34
|
-
enumerable: false,
|
|
35
|
-
value: sentinel,
|
|
36
|
-
writable: false
|
|
37
|
-
},
|
|
38
|
-
'has expected property descriptor after [[Define]]'
|
|
39
|
-
);
|
|
40
|
-
|
|
41
|
-
st.end();
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
var arrayBug = hasPropertyDescriptors.hasArrayLengthDefineBug();
|
|
45
|
-
t.test('defining array lengths', { skip: !yes || arrayBug }, function (st) {
|
|
46
|
-
var arr = [1, , 3]; // eslint-disable-line no-sparse-arrays
|
|
47
|
-
st.equal(arr.length, 3, 'array starts with length 3');
|
|
48
|
-
|
|
49
|
-
Object.defineProperty(arr, 'length', { value: 5 });
|
|
50
|
-
|
|
51
|
-
st.equal(arr.length, 5, 'array ends with length 5');
|
|
52
|
-
|
|
53
|
-
st.end();
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
t.end();
|
|
57
|
-
});
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
Copyright (c) 2022 Overlook Motel (theoverlookmotel@gmail.com)
|
|
2
|
-
|
|
3
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
4
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
5
|
-
in the Software without restriction, including without limitation the rights
|
|
6
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
7
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
8
|
-
furnished to do so, subject to the following conditions:
|
|
9
|
-
|
|
10
|
-
The above copyright notice and this permission notice shall be included in
|
|
11
|
-
all copies or substantial portions of the Software.
|
|
12
|
-
|
|
13
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
15
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
16
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
17
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
18
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
19
|
-
THE SOFTWARE.
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
[](https://www.npmjs.com/package/is-it-type)
|
|
2
|
-
[](https://github.com/overlookmotel/is-it-type/actions)
|
|
3
|
-
[](https://david-dm.org/overlookmotel/is-it-type)
|
|
4
|
-
[](https://david-dm.org/overlookmotel/is-it-type)
|
|
5
|
-
[](https://coveralls.io/r/overlookmotel/is-it-type)
|
|
6
|
-
|
|
7
|
-
# Determine type of a variable
|
|
8
|
-
|
|
9
|
-
All the functions from [core-util-is](https://www.npmjs.com/package/core-util-is) plus a few extras, in both CJS and ESM formats for use in Node.js or browser.
|
|
10
|
-
|
|
11
|
-
## Usage
|
|
12
|
-
|
|
13
|
-
### Import
|
|
14
|
-
|
|
15
|
-
```js
|
|
16
|
-
const { isString } = require('is-it-type');
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
or:
|
|
20
|
-
|
|
21
|
-
```js
|
|
22
|
-
import { isString } from 'is-it-type';
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
### Use a method
|
|
26
|
-
|
|
27
|
-
```js
|
|
28
|
-
isString('abc'); // true
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
All methods return `true` or `false`.
|
|
32
|
-
|
|
33
|
-
## Methods
|
|
34
|
-
|
|
35
|
-
### Same as [core-util-is](https://www.npmjs.com/package/core-util-is):
|
|
36
|
-
|
|
37
|
-
* `isArray`
|
|
38
|
-
* `isBoolean`
|
|
39
|
-
* `isNull`
|
|
40
|
-
* `isNullOrUndefined`
|
|
41
|
-
* `isNumber`
|
|
42
|
-
* `isString`
|
|
43
|
-
* `isSymbol`
|
|
44
|
-
* `isUndefined`
|
|
45
|
-
* `isRegExp`
|
|
46
|
-
* `isDate`
|
|
47
|
-
* `isError`
|
|
48
|
-
* `isFunction`
|
|
49
|
-
* `isPrimitive`
|
|
50
|
-
|
|
51
|
-
NB [core-util-is](https://www.npmjs.com/package/core-util-is)'s `isBuffer` is not included. `isObject` method differs from [core-util-is](https://www.npmjs.com/package/core-util-is)'s method of same name (see [below](#objects)).
|
|
52
|
-
|
|
53
|
-
### Additional functions
|
|
54
|
-
|
|
55
|
-
#### Strings
|
|
56
|
-
|
|
57
|
-
* `isEmptyString` - `true` if `=== ''`
|
|
58
|
-
* `isFullString` - `true` if a string which `!== ''`
|
|
59
|
-
|
|
60
|
-
#### Numbers
|
|
61
|
-
|
|
62
|
-
* `isInteger` - `true` if is an integer number (positive, negative or zero)
|
|
63
|
-
* `isPositiveInteger` - `true` if is an integer number > 0
|
|
64
|
-
* `isPositiveIntegerOrZero` - `true` if is an integer number >= 0
|
|
65
|
-
* `isNegativeInteger` - `true` if is an integer number < 0
|
|
66
|
-
* `isNegativeIntegerOrZero` - `true` if is an integer number <= 0
|
|
67
|
-
|
|
68
|
-
#### Objects
|
|
69
|
-
|
|
70
|
-
* `isObject` - `true` if passed object (not including arrays, regexps and other built-ins)
|
|
71
|
-
* `isEmptyObject` - `true` if passed object with no properties
|
|
72
|
-
|
|
73
|
-
#### Other
|
|
74
|
-
|
|
75
|
-
* `isType( type, input )` - `true` if `typeof input === type`
|
|
76
|
-
|
|
77
|
-
## Versioning
|
|
78
|
-
|
|
79
|
-
This module follows [semver](https://semver.org/). Breaking changes will only be made in major version updates.
|
|
80
|
-
|
|
81
|
-
All active NodeJS release lines are supported (v12+ at time of writing). After a release line of NodeJS reaches end of life according to [Node's LTS schedule](https://nodejs.org/en/about/releases/), support for that version of Node may be dropped at any time, and this will not be considered a breaking change. Dropping support for a Node version will be made in a minor version update (e.g. 1.2.0 to 1.3.0). If you are using a Node version which is approaching end of life, pin your dependency of this module to patch updates only using tilde (`~`) e.g. `~1.2.3` to avoid breakages.
|
|
82
|
-
|
|
83
|
-
## Tests
|
|
84
|
-
|
|
85
|
-
Use `npm test` to run the tests. Use `npm run cover` to check coverage.
|
|
86
|
-
|
|
87
|
-
## Changelog
|
|
88
|
-
|
|
89
|
-
See [changelog.md](https://github.com/overlookmotel/is-it-type/blob/master/changelog.md)
|
|
90
|
-
|
|
91
|
-
## Issues
|
|
92
|
-
|
|
93
|
-
If you discover a bug, please raise an issue on Github. https://github.com/overlookmotel/is-it-type/issues
|
|
94
|
-
|
|
95
|
-
## Contribution
|
|
96
|
-
|
|
97
|
-
Pull requests are very welcome. Please:
|
|
98
|
-
|
|
99
|
-
* ensure all tests pass before submitting PR
|
|
100
|
-
* add tests for new features
|
|
101
|
-
* document new functionality/API additions in README
|
|
102
|
-
* do not add an entry to Changelog (Changelog is created when cutting releases)
|