
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
An NPM package for formatting credit card expiry dates in MM/YY or MM/YYYY formats.
An NPM package for formatting credit card expiry dates in MM/YY or MM/YYYY formats.
Import the lib:
//With ES6-style imports
import {format} from "cc-expiry";
// With node-style requires:
var format = require("cc-expiry").format;
console.log(format("12 / 3456")); // '12 / 34'
console.log(format("12 / 345")); // '12 / 34'
console.log(format("12 / 34")); // '12 / 34'
console.log(format("12/34")); // '12 / 34'
console.log(format("1234")); // '12 / 34'
console.log(format("123")); // '12 / 3'
console.log(format("12")); // '12'
console.log(format("1")); // '1'
With a custom separator:
console.log(format("12 / 345", "🍎")); // '12🍎34'
console.log(format("12 / 34", "🍎")); // '12🍎34'
console.log(format("12/34", "🍎")); // '12🍎34'
console.log(format("1234", "🍎")); // '12🍎34'
console.log(format("123", "🍎")); // '12🍎3'
console.log(format("12", "🍎")); // '12'
console.log(format("1", "🍎")); // '1'
With a 4-digit year (MM / YYYY)
console.log(format("12 / 3456", "/", true)); // '12/3456'
console.log(format("12 / 345", "/", true)); // '12/345'
console.log(format("12 / 34", "/", true)); // '12/34'
console.log(format("12/34", "/", true)); // '12/34'
console.log(format("1234", "/", true)); // '12/34'
console.log(format("123", "/", true)); // '12/3'
console.log(format("12", "/", true)); // '12'
console.log(format("1", "/", true)); // '1'
FAQs
An NPM package for formatting credit card expiry dates in MM/YY or MM/YYYY formats.
We found that cc-expiry 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
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.