UNPKG

@charpeni/one-of

Version:

Type-safe utilities to return a random element from an array or random entry from an object

74 lines (73 loc) 1.66 kB
{ "name": "@charpeni/one-of", "version": "1.1.0", "description": "Type-safe utilities to return a random element from an array or random entry from an object", "keywords": [ "random", "randomize", "array", "object", "element", "item", "entry", "value", "key", "math", "pick" ], "repository": { "type": "git", "url": "https://github.com/charpeni/one-of.git" }, "license": "MIT", "author": "Nicolas Charpentier <nicolas.charpentier079@gmail.com>", "sideEffects": false, "type": "module", "exports": { ".": { "import": "./dist/index.js", "require": "./dist/index.cjs" } }, "main": "./dist/index.cjs", "module": "./dist/index.js", "types": "./dist/index.d.cts", "files": [ "LICENSE", "README.md", "dist", "package.json" ], "scripts": { "build": "tsdown", "format": "prettier --write .", "lint": "eslint .", "prepack": "pnpm build", "prepare": "husky", "test": "jest", "type-check": "tsc --pretty --noEmit", "check-exports": "attw --pack ." }, "lint-staged": { "*.{js,ts,md}": [ "prettier --write" ] }, "devDependencies": { "@arethetypeswrong/cli": "^0.18.2", "@eslint/js": "^9.28.0", "@total-typescript/tsconfig": "^1.0.4", "@types/jest": "^29.5.14", "eslint": "^9.28.0", "eslint-plugin-import": "^2.31.0", "expect-type": "^1.2.1", "husky": "^9.1.7", "jest": "^30.0.0", "lint-staged": "^16.1.0", "prettier": "3.5.3", "ts-jest": "^29.4.0", "tsdown": "^0.12.7", "typescript": "^5.8.3", "typescript-eslint": "^8.34.0" } }