@ng-doc/core
Advanced tools
| export declare function filterObject<T extends {}>(obj: T, filter: <K extends keyof T>(key: K, value: T[K]) => boolean): T; |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.filterObject = void 0; | ||
| const object_keys_1 = require("./object-keys"); | ||
| // eslint-disable-next-line @typescript-eslint/ban-types | ||
| function filterObject(obj, filter) { | ||
| return (0, object_keys_1.objectKeys)(obj).reduce((acc, key) => { | ||
| const value = obj[key]; | ||
| if (filter(key, value)) { | ||
| acc[key] = value; | ||
| } | ||
| return acc; | ||
| }, {}); | ||
| } | ||
| exports.filterObject = filterObject; | ||
| //# sourceMappingURL=filter-object.js.map |
| {"version":3,"file":"filter-object.js","sourceRoot":"","sources":["../../../../libs/core/helpers/filter-object.ts"],"names":[],"mappings":";;;AAAA,+CAAyC;AAEzC,wDAAwD;AACxD,SAAgB,YAAY,CAAe,GAAM,EAAE,MAA2D;IAC7G,OAAO,IAAA,wBAAU,EAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,GAAM,EAAE,GAAY,EAAE,EAAE;QACtD,MAAM,KAAK,GAAe,GAAG,CAAC,GAAG,CAAC,CAAC;QAEnC,IAAI,MAAM,CAAU,GAAG,EAAE,KAAK,CAAC,EAAE;YAChC,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;SACjB;QAED,OAAO,GAAG,CAAC;IACZ,CAAC,EAAE,EAAO,CAAC,CAAC;AACb,CAAC;AAVD,oCAUC"} |
@@ -8,2 +8,3 @@ export * from './as-array'; | ||
| export * from './extract-value'; | ||
| export * from './filter-object'; | ||
| export * from './is-iterable'; | ||
@@ -10,0 +11,0 @@ export * from './is-keyboard-event'; |
+1
-0
@@ -11,2 +11,3 @@ "use strict"; | ||
| tslib_1.__exportStar(require("./extract-value"), exports); | ||
| tslib_1.__exportStar(require("./filter-object"), exports); | ||
| tslib_1.__exportStar(require("./is-iterable"), exports); | ||
@@ -13,0 +14,0 @@ tslib_1.__exportStar(require("./is-keyboard-event"), exports); |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/core/helpers/index.ts"],"names":[],"mappings":";;;AAAA,qDAA2B;AAC3B,2EAAiD;AACjD,uDAA6B;AAC7B,wDAA8B;AAC9B,0DAAgC;AAChC,sEAA4C;AAC5C,0DAAgC;AAChC,wDAA8B;AAC9B,8DAAoC;AACpC,wDAA8B;AAC9B,uDAA6B;AAC7B,qDAA2B;AAC3B,uDAA6B;AAC7B,wDAA8B;AAC9B,sDAA4B;AAC5B,mDAAyB"} | ||
| {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/core/helpers/index.ts"],"names":[],"mappings":";;;AAAA,qDAA2B;AAC3B,2EAAiD;AACjD,uDAA6B;AAC7B,wDAA8B;AAC9B,0DAAgC;AAChC,sEAA4C;AAC5C,0DAAgC;AAChC,0DAAgC;AAChC,wDAA8B;AAC9B,8DAAoC;AACpC,wDAA8B;AAC9B,uDAA6B;AAC7B,qDAA2B;AAC3B,uDAA6B;AAC7B,wDAA8B;AAC9B,sDAA4B;AAC5B,mDAAyB"} |
| import { Type } from '@angular/core'; | ||
| import { NgDocPlaygroundContent } from './playground-content'; | ||
| import { NgDocPlaygroundOptions } from './playground-options'; | ||
| /** | ||
| * Playground control configuration | ||
| */ | ||
| export interface NgDocPlaygroundControlConfig { | ||
| /** | ||
| * Input type that will be used to display the playground control (e.g. `string`, `number`, `boolean`, `MyOwnType`) | ||
| */ | ||
| type: string; | ||
| /** | ||
| * Input alias that will be used to set the input value (e.g. `myInputAlias`) | ||
| */ | ||
| alias?: string; | ||
| /** | ||
| * Input description that will be used to display the tooltip on the playground control | ||
| */ | ||
| description?: string; | ||
| /** | ||
| * List of possible options, it can be list of Type Alias items | ||
| */ | ||
| options?: string[]; | ||
| } | ||
| /** Playground configuration */ | ||
@@ -11,2 +32,11 @@ export interface NgDocPlaygroundConfig extends NgDocPlaygroundOptions { | ||
| /** | ||
| * List of playground controls that will be used to render the side panel. | ||
| * NgDoc will try to guess playground controls from the component inputs, but you can override them here | ||
| * or add new ones. | ||
| * | ||
| * Object key is the class property name, and value is a type of the control. If your input name and property name | ||
| * are different, you can provide `NgDocPlaygroundControlConfig` object instead of a string to specify the input alias. | ||
| */ | ||
| controls?: Record<string, string | NgDocPlaygroundControlConfig>; | ||
| /** | ||
| * Dynamic content that you can provide to create content toggle button | ||
@@ -13,0 +43,0 @@ * The object key should be used in the playground's |
@@ -1,2 +0,2 @@ | ||
| /** List of playground properties, where key is't a name of the input */ | ||
| /** List of playground properties, where key is't a name of property */ | ||
| export type NgDocPlaygroundProperties = Record<string, NgDocPlaygroundProperty>; | ||
@@ -7,3 +7,3 @@ /** Playground property data */ | ||
| type: string; | ||
| /** The name of the property in the code (it can be different from input name) */ | ||
| /** The name of the input in the code (it can be different from property name) */ | ||
| inputName: string; | ||
@@ -10,0 +10,0 @@ /** Commend for the property */ |
@@ -30,2 +30,6 @@ /** | ||
| /** | ||
| * List of inputs that will be hidden in the playground (e.g. `['myInputName']`) | ||
| */ | ||
| hiddenInputs?: string[]; | ||
| /** | ||
| * Custom data that you can use in the templates (e.g. `{{data.providedProperty}}`) | ||
@@ -32,0 +36,0 @@ */ |
+1
-1
| { | ||
| "name": "@ng-doc/core", | ||
| "version": "16.11.1", | ||
| "version": "16.12.0", | ||
| "type": "commonjs", | ||
@@ -5,0 +5,0 @@ "sideEffects": false, |
Potential vulnerability
Supply chain riskInitial human review suggests the presence of a vulnerability in this package. It is pending further analysis and confirmation.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Potential vulnerability
Supply chain riskInitial human review suggests the presence of a vulnerability in this package. It is pending further analysis and confirmation.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
57659
4.63%167
1.83%1055
5.18%