object-path/000755 001751 000177 0000000000 14522377323014761 5ustar00runner000000 000000 1452237732314522377323object-path/LICENSE000644 001751 000177 0000002165 14522377323015772 0ustar00runner000000 000000 1452237732314522377323 MIT License Copyright (c) Microsoft Corporation. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE object-path/README.md000644 001751 000177 0000001034 14522377323016232 0ustar00runner000000 000000 1452242514514522377323# Installation > `npm install --save @types/object-path` # Summary This package contains type definitions for object-path (https://github.com/mariocasciaro/object-path). # Details Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/object-path. ### Additional Details * Last updated: Tue, 07 Nov 2023 09:09:39 GMT * Dependencies: none # Credits These definitions were written by [Paulo Cesar](https://github.com/pocesar), and [BendingBender](https://github.com/BendingBender). object-path/index.d.ts000644 001751 000177 0000007427 14522377323016674 0ustar00runner000000 000000 1452237732314522377323declare const objectPath: objectPath.ObjectPathStatic & { withInheritedProps: objectPath.ObjectPathStatic; create(options?: objectPath.Options): objectPath.ObjectPathStatic; }; declare namespace objectPath { interface Options { includeInheritedProps?: boolean | undefined; } type Path = Array | number | string; interface ObjectPathStatic { /** * Binds an object */ (object: T): ObjectPathBound; /** * Deletes a member from object or array */ del(object: object, path: Path): { [key: string]: any }; /** * Tests path existence */ has(object: object, path: Path): boolean; /** * Get a path from an object */ get(object: object, path: Path): any; get(object: object, path: Path, defaultValue: TResult): TResult; /** * Set a path to a value * @return Any existing value on the path if any */ set( object: object, path: Path, value: TResult, doNotReplace?: boolean, ): TResult | undefined; /** * Create (if path isn't an array) and push the value to it. Can push unlimited number of values */ push(object: object, path: Path, ...items: any[]): void; /** * Get the first non undefined property */ coalesce(object: object, paths: Path | Path[], defaultValue: TResult): TResult; coalesce( object: object, paths: Path | Path[], defaultValue?: TResult, ): TResult | undefined; /** * Empty a path. Arrays are set to length 0, objects have all elements deleted, strings * are set to empty, numbers to 0, everything else is set to null */ empty(object: object, path: Path): any; /** * Set a value if it doesn't exist, do nothing if it does */ ensureExists(object: object, path: Path, defaultValue: TResult): TResult; ensureExists( object: object, path: Path, defaultValue?: TResult, ): TResult | undefined; /** * Insert an item in an array path */ insert(object: object, path: Path, value: any, at?: number): void; } interface ObjectPathBound { /** * @see objectPath.del */ del(path: Path): { [key: string]: any }; /** * @see objectPath.has */ has(path: Path): boolean; /** * @see objectPath.get */ get(path: Path): any; get(path: Path, defaultValue: TResult): TResult; /** * @see objectPath.set */ set(path: Path, value: TResult, doNotReplace?: boolean): TResult | undefined; /** * @see objectPath.push */ push(path: Path, ...items: any[]): void; /** * @see objectPath.coalesce */ coalesce(paths: Path | Path[], defaultValue: TResult): TResult; coalesce(paths: Path | Path[], defaultValue?: TResult): TResult | undefined; /** * @see objectPath.empty */ empty(path: Path): any; /** * @see objectPath.ensureExists */ ensureExists(path: Path, defaultValue: TResult): TResult; ensureExists(path: Path, defaultValue?: TResult): TResult | undefined; /** * @see objectPath.insert */ insert(path: Path, value: any, at?: number): void; } } export = objectPath; object-path/package.json000644 001751 000177 0000001677 14522377323017256 0ustar00runner000000 000000 1452242514514522377323{ "name": "@types/object-path", "version": "0.11.4", "description": "TypeScript definitions for object-path", "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/object-path", "license": "MIT", "contributors": [ { "name": "Paulo Cesar", "githubUsername": "pocesar", "url": "https://github.com/pocesar" }, { "name": "BendingBender", "githubUsername": "BendingBender", "url": "https://github.com/BendingBender" } ], "main": "", "types": "index.d.ts", "repository": { "type": "git", "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", "directory": "types/object-path" }, "scripts": {}, "dependencies": {}, "typesPublisherContentHash": "23523f636d682afbe226b21cf22483652f627d51e9f15df5657f01f05d3545db", "typeScriptVersion": "4.5" }