@x-oasis/can-i-use-proxy 0.1.11

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 ADDED
@@ -0,0 +1,19 @@
1
+ # @x-oasis/can-i-use-proxy
2
+
3
+ ## Installation
4
+
5
+ ```bash
6
+ $ npm i @x-oasis/can-i-use-proxy
7
+ ```
8
+
9
+ ## How to use
10
+
11
+ ```typescript
12
+ import canIUseProxy from '@x-oasis/can-i-use-proxy'
13
+ ```
14
+
15
+ ## How to run test
16
+
17
+ ```bash
18
+ $ pnpm test
19
+ ```
@@ -0,0 +1,15 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var index = (function () {
6
+ try {
7
+ new Proxy({}, {});
8
+ } catch (err) {
9
+ return false;
10
+ }
11
+ return true;
12
+ });
13
+
14
+ exports.default = index;
15
+ //# sourceMappingURL=can-i-use-proxy.cjs.development.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"can-i-use-proxy.cjs.development.js","sources":["../src/index.ts"],"sourcesContent":["export default () => {\n try {\n new Proxy({}, {}); // eslint-disable-line\n } catch (err) {\n return false;\n }\n\n return true;\n};\n"],"names":["Proxy","err"],"mappings":";;;;AAAA,aAAe;EACb,IAAI;IACF,IAAIA,KAAK,CAAC,EAAE,EAAE,EAAE,CAAC;GAClB,CAAC,OAAOC,GAAG,EAAE;IACZ,OAAO,KAAK;;EAGd,OAAO,IAAI;AACb,CAAC;;;;"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(){try{new Proxy({},{})}catch(e){return!1}return!0};
2
+ //# sourceMappingURL=can-i-use-proxy.cjs.production.min.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"can-i-use-proxy.cjs.production.min.js","sources":["../src/index.ts"],"sourcesContent":["export default () => {\n try {\n new Proxy({}, {}); // eslint-disable-line\n } catch (err) {\n return false;\n }\n\n return true;\n};\n"],"names":["Proxy","err"],"mappings":"+FACE,IACE,IAAIA,MAAM,GAAI,IACd,MAAOC,GACP,OAAO,EAGT,OAAO"}
@@ -0,0 +1,11 @@
1
+ var index = (function () {
2
+ try {
3
+ new Proxy({}, {});
4
+ } catch (err) {
5
+ return false;
6
+ }
7
+ return true;
8
+ });
9
+
10
+ export default index;
11
+ //# sourceMappingURL=can-i-use-proxy.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"can-i-use-proxy.esm.js","sources":["../src/index.ts"],"sourcesContent":["export default () => {\n try {\n new Proxy({}, {}); // eslint-disable-line\n } catch (err) {\n return false;\n }\n\n return true;\n};\n"],"names":["Proxy","err"],"mappings":"AAAA,aAAe;EACb,IAAI;IACF,IAAIA,KAAK,CAAC,EAAE,EAAE,EAAE,CAAC;GAClB,CAAC,OAAOC,GAAG,EAAE;IACZ,OAAO,KAAK;;EAGd,OAAO,IAAI;AACb,CAAC;;;;"}
@@ -0,0 +1,2 @@
1
+ declare const _default: () => boolean;
2
+ export default _default;
package/dist/index.js ADDED
@@ -0,0 +1,8 @@
1
+
2
+ 'use strict'
3
+
4
+ if (process.env.NODE_ENV === 'production') {
5
+ module.exports = require('./can-i-use-proxy.cjs.production.min.js')
6
+ } else {
7
+ module.exports = require('./can-i-use-proxy.cjs.development.js')
8
+ }
package/package.json ADDED
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "@x-oasis/can-i-use-proxy",
3
+ "version": "0.1.11",
4
+ "description": "can-i-use-proxy function",
5
+ "main": "dist/index.js",
6
+ "typings": "dist/index.d.ts",
7
+ "module": "dist/can-i-use-proxy.esm.js",
8
+ "files": [
9
+ "dist",
10
+ "index.ts",
11
+ "src"
12
+ ],
13
+ "author": "",
14
+ "license": "ISC",
15
+ "devDependencies": {
16
+ "tsdx": "^0.14.1"
17
+ },
18
+ "scripts": {
19
+ "build": "tsdx build --tsconfig tsconfig.build.json",
20
+ "clean": "rimraf ./dist",
21
+ "test": "vitest",
22
+ "compile": "tsc -p tsconfig.build.json"
23
+ }
24
+ }
package/src/index.ts ADDED
@@ -0,0 +1,9 @@
1
+ export default () => {
2
+ try {
3
+ new Proxy({}, {}); // eslint-disable-line
4
+ } catch (err) {
5
+ return false;
6
+ }
7
+
8
+ return true;
9
+ };