Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
lib-redactor
Advanced tools
npm install -S lib-redactor
import redactor from "lib-redactor";
const redactMe = {
first_name: "John",
last_name: "Doe",
phone_number: "6969696969",
email: "john.doe69@email.com"
};
const redactionRule = redactor(["phone_number", "email"]);
const redacted = redactionRule(redactMe);
console.log(redacted);
/// will log the following:
/// {
/// "first_name": "John",
/// "last_name": "Doe",
/// "phone_number: "6████████9",
/// "email": "j██████████████████m"
/// }
import redactor from "lib-redactor";
const redactMe = {
first_name: "John",
last_name: "Doe",
phone_number: "6969696969",
email: "john.doe69@email.com"
};
const options = {
maskCharacter: "X"
};
const redactionRule = redactor(["phone_number", "email"], options);
const redacted = redactionRule(redactMe);
console.log(redacted);
/// will log the following:
/// {
/// "first_name": "John",
/// "last_name": "Doe",
/// "phone_number: "6XXXXXXXX9",
/// "email": "jXXXXXXXXXXXXXXXXXXm"
/// }
import redactor from "lib-redactor";
const redactMe = {
phrase: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
}
;
const options = {
maskCharacter: "X",
fullRedaction: true,
blacklistedWords: [
/Lorem/g,
"elit",
"non",
"dolor"
]
};
const redactionRule = redactor([], options);
const redacted = redactionRule(redactMe);
console.log(redacted);
/// will log the following:
/// {
/// "phrase_full": "XXXXX ipsum XXXXX sit amet, consectetur adipiscing XXXX, sed do eiusmod tempor incididunt ut labore et XXXXXe magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure XXXXX in reprehenderit in voluptate vXXXX esse cillum XXXXXe eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat XXX proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
/// }
lib-redactor is WTFPL licensed.
FAQs
Another library that will help you ██████ texts with ease.
The npm package lib-redactor receives a total of 0 weekly downloads. As such, lib-redactor popularity was classified as not popular.
We found that lib-redactor demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.