
Security News
Deno 2.6 + Socket: Supply Chain Defense In Your CLI
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.
Some useful stuffs packed to here.
formatDuration(ms, formatting) now supports excluding time parts!formatDuration(1767229200000,{
years: null,
months: null,
weeks: null,
days: ["day", "days"],
hours: ["hour", "hours"],
minutes: ["minute", "minutes"],
seconds: ["second", "seconds"]
});
broadcastProxy(anyArrayOfT): T.const apple = {
delicious: true,
eat: () => console.log("Apple is delicious")
};
const avocado = {
delicious: false,
eat: () => console.log("Avocado is gross")
};
const fruitBroadcast = broadcastProxy([apple, avocado]);
fruitBroadcast.eat();
// Apple is delicious
// Avocado is gross
console.log(fruitBroadcast.delicious);
// [true, false]
cronMinuteTrigger(minuteMarks, callback). Eg: cronMinuteTrigger([0, 15, 30, 45], () => { console.log("Triggered"); })cronHourTrigger(hourMarks, callback). Eg: cronHourTrigger([0, 6, 12, 18], () => { console.log("Triggered"); })cronDayTrigger(dayMarks, callback). Eg: cronDayTrigger([0, 3, 5], () => { console.log("Triggered"); })chunkifyString(str, chunkSize, separator?). Eg: chunkifyString("Hello, world!", 7, ",") -> ["Hello", " world!"]formatDuration(ms, formatting?). Eg: formatDuration(600000000) -> 6 days, 22 hours, 40 minutesmapReplace(text, map, recursive=true). Eg: mapReplace({ test: 1, test2: "hello", deep: { test3: "world" } }, {"hello": "hey", "world": "guy"}, true) => { test: 1, test2: "hey", deep: { test3: "guy" } }combinations(["1","2","3"]) added. Eg: [...combinations(["1","2","3"])] -> [["1"],["2"],["1","2"],["3"],["1","3"],["2","3"],["1","2","3"]]parseDuration(str) added. Eg: parseDuration("1m30s") -> 90000mapReplace(text, map) now map argument supports entry mappings. Eg: [[/a/g, "aaa"], [/b/g, "bbb"]];fillGaps(array) added. Eg: fillGaps([1, 2, 5]) -> [1, 2, 3, 4, 5]defaultify() on arrays..validateShape(data, originalData, recursive=true) added. Validates object shape based on original object types.getValueType(value) added. Eg: getValueType("") -> String, getValueType([]) -> Arraydefaultify(data, defaultData, recursive=true) added.execAsync(cmd, cwd?) added.execAsync(cmd) added.escapeRegex(str) added.mapReplace(text, map) added.
mapReplace('Hello, world!', {'world': 'Universe'})formatSeconds(seconds) added. Formats seconds to cool-looking string. formatSecond(363) -> '06:03'chunkify(array, chunkSize) added. Chunks an array into smaller arrays.accurateSleep(milliseconds) added. For much better for millisecond-level accuracy. But uses more resources.defaultify.makeSureFolderExists(path) added.makeSureFolderExistsSync(path) added.makeSureFileExists(path, content, encoding?) added.makeSureFileExistsSync(path, content, encoding?) added.defaultify(data, defaultData) added. (Data is a object)percent(part, total, maxVal?, nanVal?) added.threeDots(text, maxLength) added.isThenable(any) added.require('stuffs/lib/randomString'))randomString(length?, map?) added.
randomString.STRING_MAP_HEXrandomString.STRING_MAP_NUMERICrandomString.STRING_MAP_ALPHABET_LOWERrandomString.STRING_MAP_ALPHABET_UPPERrandomString.STRING_MAP_ALPHANUMERICrejectAfter(ms, reason?) added.
FAQs
Some useful stuffs packed to here.
The npm package stuffs receives a total of 222 weekly downloads. As such, stuffs popularity was classified as not popular.
We found that stuffs demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers 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
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.

Security News
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.