![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Does repetition in code bother you to what others call an unreasonable degree?
Is DRY (Don't Repeat Yourself) such a governing rule when you write code that you regularly apply it to real life scenarios?
Do blocks of code with even this level of repetition offend you at a visceral level?
let thing = operator('thing')
let aThing = operator('aThing')
let thisThing = operator('thisThing')
let thatThing = operator('thatThing')
let theOtherThing = operator('theOtherThing')
Be offended no more: just make it drier
!
let {thing, aThing, thisThing, thatThing, theOtherThing} = require('drier')(operator)
...and through the magic of destructuring and proxies, never stutter variables in code again!
drier
is a function which invokes its input function with a string of each variable name to the left of the destructuring assignment,
removing the need to repeat them, and maybe encourage more meaningful names.
You could alternatively describe it as an iterator across variable names.
const drier = require('./drier.js')
const dryquire = drier(require)
const {fs, crypto, util, http, os, repl, express, "package.json":{scripts}} = dryquire
const {sqlA, sqlB, sqlC, sqlD} = drier(s => fs.readFileSync(`${__dirname}/${s}.sql`))
FAQs
eliminate repetition or stutter in assignments
The npm package drier receives a total of 0 weekly downloads. As such, drier popularity was classified as not popular.
We found that drier 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.