@bjmrq/utils
Advanced tools
Comparing version 0.0.7 to 0.0.10
export declare const isBrowser: () => boolean; | ||
export declare const isLocation: (location: string) => boolean; | ||
export declare const isLocation: (locationToCheck: string) => boolean; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.isLocation = exports.isBrowser = void 0; | ||
exports.isBrowser = () => typeof window !== 'undefined'; | ||
exports.isLocation = (location) => exports.isBrowser() && window.location.pathname.includes(location); | ||
exports.isBrowser = () => typeof window !== "undefined"; | ||
exports.isLocation = (locationToCheck) => exports.isBrowser() && window.location.pathname.includes(locationToCheck); | ||
//# sourceMappingURL=environnement.js.map |
@@ -0,2 +1,4 @@ | ||
/// <reference types="ts-toolbelt" /> | ||
export declare const nameOf: <U, V>(obj: U) => V; | ||
export declare const idOf: <T>(obj: Record<"id", T>) => T; | ||
export declare const sanitizeObject: import("Function/Curry").Curry<(head: string[], head: Record<string, any>) => Pick<Record<string, any>, never>>; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.idOf = exports.nameOf = void 0; | ||
exports.sanitizeObject = exports.idOf = exports.nameOf = void 0; | ||
const ramda_1 = require("ramda"); | ||
exports.nameOf = ramda_1.propOr("No name", "name"); | ||
exports.idOf = ramda_1.prop("id"); | ||
exports.sanitizeObject = ramda_1.curryN(2, (keysToSanitize, object) => ramda_1.omit(keysToSanitize, object)); | ||
//# sourceMappingURL=object.js.map |
{ | ||
"name": "@bjmrq/utils", | ||
"version": "0.0.7", | ||
"version": "0.0.10", | ||
"description": "A toolkit of little utilities", | ||
"author": "Benjamin Marquis", | ||
"license": "ISC", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/BjMrq/Utils" | ||
}, | ||
"main": "dist/src/index.js", | ||
@@ -18,4 +24,2 @@ "types": "dist/src/index.d.ts", | ||
}, | ||
"author": "Benjamin Marquis", | ||
"license": "ISC", | ||
"dependencies": { | ||
@@ -22,0 +26,0 @@ "fp-ts": "^2.8.4", |
Sorry, the diff of this file is not supported yet
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 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
10392
29
119
0