UNPKG

mock-property

Version:

Given an object and a property, replaces a property descriptor (or deletes it), and returns a thunk to restore it.

119 lines (118 loc) 3.2 kB
{ "name": "mock-property", "version": "1.1.0", "description": "Given an object and a property, replaces a property descriptor (or deletes it), and returns a thunk to restore it.", "main": "index.js", "exports": { ".": "./index.js", "./package.json": "./package.json" }, "types": "./index.d.ts", "sideEffects": false, "scripts": { "prepack": "npmignore --auto --commentLines=autogenerated", "prepublish": "not-in-publish || npm run prepublishOnly", "prepublishOnly": "safe-publish-latest", "prelint": "evalmd README.md", "lint": "eslint --ext=.js,.mjs .", "postlint": "tsc && attw -P", "pretest": "npm run lint", "tests-only": "nyc tape 'test/**/*.js'", "test": "npm run tests-only", "posttest": "npx npm@'>=10.2' audit --production", "version": "auto-changelog && git add CHANGELOG.md", "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" }, "repository": { "type": "git", "url": "git+https://github.com/ljharb/mock-property.git" }, "keywords": [ "testing", "mock", "object", "property", "value", "descriptor", "test", "delete", "define" ], "author": "Jordan Harband <ljharb@gmail.com>", "funding": { "url": "https://github.com/sponsors/ljharb" }, "license": "MIT", "bugs": { "url": "https://github.com/ljharb/mock-property/issues" }, "homepage": "https://github.com/ljharb/mock-property#readme", "devDependencies": { "@arethetypeswrong/cli": "^0.15.3", "@ljharb/eslint-config": "^21.1.1", "@ljharb/tsconfig": "^0.2.0", "@types/es-value-fixtures": "^1.4.4", "@types/for-each": "^0.3.3", "@types/functions-have-names": "^1.2.2", "@types/get-intrinsic": "^1.2.2", "@types/gopd": "^1.0.3", "@types/has-bigints": "^1.0.2", "@types/has-property-descriptors": "^1.0.3", "@types/has-symbols": "^1.0.2", "@types/is-callable": "^1.1.2", "@types/isarray": "^2.0.2", "@types/make-arrow-function": "^1.2.2", "@types/make-async-function": "^1.0.2", "@types/make-generator-function": "^2.0.3", "@types/node": "^0.12.25", "@types/object-inspect": "^1.13.0", "@types/object.assign": "^4.1.0", "@types/tape": "^5.6.4", "auto-changelog": "^2.4.0", "encoding": "^0.1.13", "es-value-fixtures": "^1.4.2", "eslint": "=8.8.0", "evalmd": "^0.0.19", "for-each": "^0.3.3", "has-symbols": "^1.0.3", "in-publish": "^2.0.1", "npmignore": "^0.3.1", "nyc": "^10.3.2", "safe-publish-latest": "^2.0.0", "tape": "^5.8.1", "typescript": "next" }, "dependencies": { "define-data-property": "^1.1.4", "functions-have-names": "^1.2.3", "gopd": "^1.0.1", "has-property-descriptors": "^1.0.2", "hasown": "^2.0.2", "isarray": "^2.0.5", "object-inspect": "^1.13.2" }, "engines": { "node": ">= 0.4" }, "testling": { "files": "test/index.js" }, "auto-changelog": { "output": "CHANGELOG.md", "template": "keepachangelog", "unreleased": false, "commitLimit": false, "backfillLimit": false, "hideCredit": true }, "publishConfig": { "ignore": [ ".github/workflows" ] }, "overrides": { "tape": { "mock-property@1": "file:../../" } } }