@zthun/helpful-reflection 9.4.2 → 9.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.map +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../src/tag/tag.ts"],"sourcesContent":["import { firstDefined } from \"@zthun/helpful-fn\";\nimport { defineMetadata, getMetadata } from \"reflect-metadata/no-conflict\";\n\nconst Key = \"zthunworks:tags\";\n\nexport function ZTag(\n by: string,\n): MethodDecorator & ClassDecorator & PropertyDecorator {\n return (target: any, property?: string | symbol) => {\n if (property == null) {\n // Class.\n const current = firstDefined({}, getMetadata(Key, target));\n defineMetadata(Key, { ...current, [by]: true }, target);\n } else {\n // Member.\n const current = firstDefined({}, getMetadata(Key, target, property));\n defineMetadata(Key, { ...current, [by]: true }, target, property);\n }\n };\n}\n\nexport function isTagged(\n by: string,\n target: any,\n property?: string | symbol,\n): boolean {\n const candidates = [\"function\", \"object\"];\n const type = typeof target;\n\n if (target == null || !candidates.includes(type)) {\n return false;\n }\n\n const tags = property\n ? getMetadata(Key, target, property)\n : getMetadata(Key, target);\n\n return Object.prototype.hasOwnProperty.call(firstDefined({}, tags), by);\n}\n"],"names":["Key","ZTag","by","target","property","current","firstDefined","getMetadata","defineMetadata","isTagged","candidates","type","includes","tags","Object","prototype","hasOwnProperty","call"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAMA,GAAM,
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../src/tag/tag.ts"],"sourcesContent":["import { firstDefined } from \"@zthun/helpful-fn\";\nimport { defineMetadata, getMetadata } from \"reflect-metadata/no-conflict\";\n\nconst Key = \"zthunworks:tags\";\n\nexport function ZTag(\n by: string,\n): MethodDecorator & ClassDecorator & PropertyDecorator {\n return (target: any, property?: string | symbol) => {\n if (property == null) {\n // Class.\n const current = firstDefined({}, getMetadata(Key, target));\n defineMetadata(Key, { ...current, [by]: true }, target);\n } else {\n // Member.\n const current = firstDefined({}, getMetadata(Key, target, property));\n defineMetadata(Key, { ...current, [by]: true }, target, property);\n }\n };\n}\n\nexport function isTagged(\n by: string,\n target: any,\n property?: string | symbol,\n): boolean {\n const candidates = [\"function\", \"object\"];\n const type = typeof target;\n\n if (target == null || !candidates.includes(type)) {\n return false;\n }\n\n const tags = property\n ? getMetadata(Key, target, property)\n : getMetadata(Key, target);\n\n return Object.prototype.hasOwnProperty.call(firstDefined({}, tags), by);\n}\n"],"names":["Key","ZTag","by","target","property","current","firstDefined","getMetadata","defineMetadata","isTagged","candidates","type","includes","tags","Object","prototype","hasOwnProperty","call"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAMA,GAAAA,GAAM,iBAAA;AAEL,SAASC,KACdC,EAAU,EAAA;AAEV,IAAA,OAAO,SAACC,MAAAA,EAAaC,QAAAA,EAAAA;AACnB,QAAA,IAAIA,YAAY,IAAA,EAAM;;AAEpB,YAAA,IAAMC,OAAAA,GAAUC,sBAAAA,CAAa,EAAC,EAAGC,uBAAYP,GAAAA,EAAKG,MAAAA,CAAAA,CAAAA;AAClDK,YAAAA,yBAAAA,CAAeR,GAAAA,EAAK,oBAAA,CAAA,cAAA,CAAA,EAAA,EAAKK,OAAAA,CAAAA,EAAS,gBAAA,CAAA,EAAA,EAACH,IAAK,IAAA,CAAA,CAAA,EAAQC,MAAAA,CAAAA;QAClD,CAAA,MAAO;;AAEL,YAAA,IAAME,WAAUC,sBAAAA,CAAa,EAAC,EAAGC,sBAAAA,CAAYP,KAAKG,MAAAA,EAAQC,QAAAA,CAAAA,CAAAA;AAC1DI,YAAAA,yBAAAA,CAAeR,KAAK,oBAAA,CAAA,cAAA,CAAA,EAAA,EAAKK,QAAAA,CAAAA,EAAS,gBAAA,CAAA,EAAA,EAACH,EAAAA,EAAK,QAAQC,MAAAA,EAAQC,QAAAA,CAAAA;AAC1D,QAAA;AACF,IAAA,CAAA;AACF;AAEO,SAASK,QAAAA,CACdP,EAAU,EACVC,MAAW,EACXC,QAA0B,EAAA;AAE1B,IAAA,IAAMM,UAAAA,GAAa;AAAC,QAAA,UAAA;AAAY,QAAA;AAAS,KAAA;IACzC,IAAMC,IAAAA,GAAO,OAAOR,MAAAA,KAAAA,WAAAA,GAAAA,WAAAA,GAAP,QAAA,CAAOA,MAAAA,CAAAA;AAEpB,IAAA,IAAIA,UAAU,IAAA,IAAQ,CAACO,UAAAA,CAAWE,QAAQ,CAACD,IAAAA,CAAAA,EAAO;QAChD,OAAO,KAAA;AACT,IAAA;AAEA,IAAA,IAAME,OAAOT,QAAAA,GACTG,sBAAAA,CAAYP,KAAKG,MAAAA,EAAQC,QAAAA,CAAAA,GACzBG,uBAAYP,GAAAA,EAAKG,MAAAA,CAAAA;IAErB,OAAOW,MAAAA,CAAOC,SAAS,CAACC,cAAc,CAACC,IAAI,CAACX,sBAAAA,CAAa,EAAC,EAAGO,IAAAA,CAAAA,EAAOX,EAAAA,CAAAA;AACtE;;;;;"}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/tag/tag.ts"],"sourcesContent":["import { firstDefined } from \"@zthun/helpful-fn\";\nimport { defineMetadata, getMetadata } from \"reflect-metadata/no-conflict\";\n\nconst Key = \"zthunworks:tags\";\n\nexport function ZTag(\n by: string,\n): MethodDecorator & ClassDecorator & PropertyDecorator {\n return (target: any, property?: string | symbol) => {\n if (property == null) {\n // Class.\n const current = firstDefined({}, getMetadata(Key, target));\n defineMetadata(Key, { ...current, [by]: true }, target);\n } else {\n // Member.\n const current = firstDefined({}, getMetadata(Key, target, property));\n defineMetadata(Key, { ...current, [by]: true }, target, property);\n }\n };\n}\n\nexport function isTagged(\n by: string,\n target: any,\n property?: string | symbol,\n): boolean {\n const candidates = [\"function\", \"object\"];\n const type = typeof target;\n\n if (target == null || !candidates.includes(type)) {\n return false;\n }\n\n const tags = property\n ? getMetadata(Key, target, property)\n : getMetadata(Key, target);\n\n return Object.prototype.hasOwnProperty.call(firstDefined({}, tags), by);\n}\n"],"names":["Key","ZTag","by","target","property","current","firstDefined","getMetadata","defineMetadata","isTagged","candidates","type","includes","tags","Object","prototype","hasOwnProperty","call"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAMA,GAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/tag/tag.ts"],"sourcesContent":["import { firstDefined } from \"@zthun/helpful-fn\";\nimport { defineMetadata, getMetadata } from \"reflect-metadata/no-conflict\";\n\nconst Key = \"zthunworks:tags\";\n\nexport function ZTag(\n by: string,\n): MethodDecorator & ClassDecorator & PropertyDecorator {\n return (target: any, property?: string | symbol) => {\n if (property == null) {\n // Class.\n const current = firstDefined({}, getMetadata(Key, target));\n defineMetadata(Key, { ...current, [by]: true }, target);\n } else {\n // Member.\n const current = firstDefined({}, getMetadata(Key, target, property));\n defineMetadata(Key, { ...current, [by]: true }, target, property);\n }\n };\n}\n\nexport function isTagged(\n by: string,\n target: any,\n property?: string | symbol,\n): boolean {\n const candidates = [\"function\", \"object\"];\n const type = typeof target;\n\n if (target == null || !candidates.includes(type)) {\n return false;\n }\n\n const tags = property\n ? getMetadata(Key, target, property)\n : getMetadata(Key, target);\n\n return Object.prototype.hasOwnProperty.call(firstDefined({}, tags), by);\n}\n"],"names":["Key","ZTag","by","target","property","current","firstDefined","getMetadata","defineMetadata","isTagged","candidates","type","includes","tags","Object","prototype","hasOwnProperty","call"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAMA,GAAAA,GAAM,iBAAA;AAEL,SAASC,KACdC,EAAU,E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AAS,CAACC,cAAc,CAACC,IAAI,CAACX,YAAAA,CAAa,EAAC,EAAGO,IAAAA,CAAAA,EAAOX,EAAAA,CAAAA;AACtE;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zthun/helpful-reflection",
|
|
3
|
-
"version": "9.4.
|
|
3
|
+
"version": "9.4.3",
|
|
4
4
|
"description": "Helpful decorators built around reflect-metadata.",
|
|
5
5
|
"author": "Anthony Bonta",
|
|
6
6
|
"license": "MIT",
|
|
@@ -25,18 +25,18 @@
|
|
|
25
25
|
"access": "public"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@zthun/helpful-fn": "^9.4.
|
|
28
|
+
"@zthun/helpful-fn": "^9.4.3",
|
|
29
29
|
"reflect-metadata": "^0.2.2"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@zthun/janitor-build-config": "^19.3.
|
|
33
|
-
"typescript": "~5.
|
|
34
|
-
"vite": "^7.
|
|
32
|
+
"@zthun/janitor-build-config": "^19.3.3",
|
|
33
|
+
"typescript": "~5.9.2",
|
|
34
|
+
"vite": "^7.1.4",
|
|
35
35
|
"vitest": "^3.2.4"
|
|
36
36
|
},
|
|
37
37
|
"files": [
|
|
38
38
|
"dist"
|
|
39
39
|
],
|
|
40
40
|
"sideEffects": false,
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "b1ee51f26c2077155aa02f1cec543488486fe416"
|
|
42
42
|
}
|