@bjmrq/utils
Advanced tools
Comparing version 0.0.16 to 0.0.17
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.sanitizeExposedBody = void 0; | ||
const function_1 = require("fp-ts/lib/function"); | ||
const Ei = __importStar(require("fp-ts/lib/Either")); | ||
const general_utils_1 = require("../general-utils"); | ||
exports.sanitizeExposedBody = function_1.flow(general_utils_1.sanitizeObject(["password", "email", "token"]), JSON.stringify); | ||
exports.sanitizeExposedBody = function_1.flow(general_utils_1.sanitizeObject(["password", "email", "token"]), (sanitized) => Ei.stringifyJSON(sanitized, Ei.toError), Ei.getOrElse((error) => `Could Not Sanitize Body: ${error.message}`)); | ||
//# sourceMappingURL=sanitizer.js.map |
{ | ||
"name": "@bjmrq/utils", | ||
"version": "0.0.16", | ||
"version": "0.0.17", | ||
"description": "A toolkit of little utilities", | ||
@@ -5,0 +5,0 @@ "author": "Benjamin Marquis", |
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
12089
146