| { | ||
| "type": "commonjs" | ||
| } |
| /** | ||
| * This is a type guard that determines whether the given unknown value | ||
| * is an object with a property of a certain type. | ||
| * @param value | ||
| * @param propName | ||
| */ | ||
| export function hasProperty(value, propName) { | ||
| return typeof value === "object" && value !== null && propName in value; | ||
| } |
| /** | ||
| * This is a type guard that determines whether the given unknown value | ||
| * is an object with a property of a certain type. | ||
| * @param value | ||
| * @param propName | ||
| */ | ||
| export declare function hasProperty<U extends unknown, P extends PropertyKey>(value: U, propName: P): value is U & { | ||
| [key in P]: unknown; | ||
| }; |
| /** | ||
| * This is a type guard that determines whether the given unknown value | ||
| * is an object with a property of a certain type. | ||
| * @param value | ||
| * @param propName | ||
| */ | ||
| export function hasProperty(value, propName) { | ||
| return typeof value === "object" && value !== null && propName in value; | ||
| } |
+21
| MIT License | ||
| Copyright (c) 2020 Bradley Odell | ||
| 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. |
| # unknown | ||
| A TypeScript utility library for interacting with the 'unknown' type. | ||
| [](https://travis-ci.com/BTOdell/unknown) |
+54
-6
| { | ||
| "name": "unknown", | ||
| "version": "0.1.0", | ||
| "description": "Unknown description", | ||
| "main": "index.js", | ||
| "version": "0.2.0", | ||
| "description": "A TypeScript utility library for interacting with the 'unknown' type.", | ||
| "keywords": [ | ||
| "typescript" | ||
| ], | ||
| "author": "BTOdell", | ||
| "license": "MIT", | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "https://github.com/BTOdell/unknown.git" | ||
| }, | ||
| "bugs": { | ||
| "url": "https://github.com/BTOdell/unknown/issues" | ||
| }, | ||
| "homepage": "https://github.com/BTOdell/unknown", | ||
| "type": "module", | ||
| "main": "./dist/cjs/unknown.js", | ||
| "module": "./dist/unknown.js", | ||
| "exports": { | ||
| ".": { | ||
| "require": "./dist/cjs/unknown.js", | ||
| "default": "./dist/unknown.js" | ||
| } | ||
| }, | ||
| "types": "./dist/unknown.d.ts", | ||
| "files": [ | ||
| "dist/**/*.js", | ||
| "dist/**/*.d.ts", | ||
| "dist/**/package.json" | ||
| ], | ||
| "directories": { | ||
| "lib": "dist" | ||
| }, | ||
| "dependencies": {}, | ||
| "devDependencies": { | ||
| "@types/chai": "^4.2.11", | ||
| "@types/mocha": "^7.0.2", | ||
| "@types/node": "^14.0.4", | ||
| "chai": "^4.2.0", | ||
| "mocha": "^7.1.2", | ||
| "npm-run-all": "^4.1.5", | ||
| "shx": "^0.3.2", | ||
| "typescript": "^3.9.3" | ||
| }, | ||
| "scripts": { | ||
| "test": "echo \"Error: no test specified\" && exit 1" | ||
| "build": "tsc -b src && shx cp ./package.cjs.json ./dist/cjs/package.json", | ||
| "pretest": "npm run build", | ||
| "test": "npm link && npm link unknown && npm run test-fast", | ||
| "test-fast": "tsc -b test && mocha", | ||
| "prepublishOnly": "npm run build", | ||
| "clean": "shx rm -rf ./dist ./test/**/*.js ./**/*.tsbuildinfo" | ||
| }, | ||
| "author": "snowmanzzz", | ||
| "license": "ISC" | ||
| "engines": { | ||
| "node": "14.0.0", | ||
| "npm": "6.14.0" | ||
| } | ||
| } |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
3710
1499.14%7
600%27
Infinity%0
-100%1
-66.67%1
-50%5
Infinity%0
-100%Yes
NaN8
Infinity%