@transloadit/has-property
Advanced tools
Comparing version 0.2.4 to 1.0.0
@@ -1,2 +0,1 @@ | ||
declare const _default: <K extends PropertyKey>(obj: unknown, key: K | null | undefined) => obj is Record<K, unknown>; | ||
export = _default; | ||
export declare function hasProperty<K extends PropertyKey>(obj: unknown, key: K | null | undefined): obj is Record<K, unknown>; |
"use strict"; | ||
module.exports = function hasProperty(obj, key) { | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.hasProperty = hasProperty; | ||
function hasProperty(obj, key) { | ||
return key != null && obj != null && typeof obj === 'object' && Object.hasOwn(obj, key); | ||
}; | ||
} | ||
//# sourceMappingURL=has-property.js.map |
{ | ||
"name": "@transloadit/has-property", | ||
"version": "0.2.4", | ||
"version": "1.0.0", | ||
"repository": { | ||
@@ -12,7 +12,11 @@ "type": "git", | ||
"types": "dist/has-property.d.ts", | ||
"files": [ | ||
"dist", | ||
"src", | ||
"!*.test.*" | ||
], | ||
"scripts": { | ||
"build": "tsc --build --clean && tsc --build", | ||
"typecheck": "tsc --noEmit", | ||
"test": "tsx --test src/**/*.test.ts", | ||
"test:watch": "tsx --test --watch src/**/*.test.ts" | ||
"prepack": "tsc --build", | ||
"test": "tsc --build && node --test --enable-source-maps", | ||
"test:watch": "node --test --enable-source-maps --watch" | ||
}, | ||
@@ -19,0 +23,0 @@ "publishConfig": { |
@@ -1,2 +0,2 @@ | ||
export = function hasProperty<K extends PropertyKey>( | ||
export function hasProperty<K extends PropertyKey>( | ||
obj: unknown, | ||
@@ -3,0 +3,0 @@ key: K | null | undefined, |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1
36146
7
13