Security News
Cloudflare Adds Security.txt Setup Wizard
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Client input validation library.
npm install --save check-if
yarn add check-if
const checkIf = require('check-if')
// [your code here...]
if (!checkIf.isShortDate('2043-01-01')) {
// Logic to handle invalid input goes here
}
Function | Description |
---|---|
areInSyncFirestoreTimestamps(timeA, timeB) | Returns false if: - any of the inputs is not a valid firebase.Firestore.Timestamp - the times don't match |
containsExactProperties(object, properties) | Returns false if the properties listed in properties do not match the properties contained in object . |
containsUpdatedProperties(objectUpdates, originalObject) | Returns false if any of the properties in the objectUpdates has the same value in originalObject . Only does a shallow comparison (does not works for objects that does not contain nested objects/properties). |
isFirestoreId(id) | Returns false if: - not a valid Firestore id (20 characters a-z, A-Z, and 0-9) |
isFirestoreTimestamp(timestamp) | Returns false if: - not a valid firebase.firestore.Timestamp (contains toDate and toMillis functions) |
isNonDeletedObject(object) | Returns false if: - object is not of type object - object.deleted or object.del is defined and set to true |
isNonEmptyFirestoreDocumentSnapshot(documentSnapshot) | Returns false if: - documentSnapshot is not of type object - documentSnapshot.exists is undefined or false |
isShortDate(value) | Expects a date with the format (YYYY-MM-DD). Returns false if: - value is not a string with exactly 10 characters - value can not be parsed by new Date(value) |
isTrimmedNonEmptyString(value) | Returns false if: - value is not a string - value is not trimmed - string is empty |
FAQs
Input validation for Apollo Server.
The npm package check-if receives a total of 27 weekly downloads. As such, check-if popularity was classified as not popular.
We found that check-if 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
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.
Security News
ENISA’s 2024 report highlights the EU’s top cybersecurity threats, including rising DDoS attacks, ransomware, supply chain vulnerabilities, and weaponized AI.