
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
liberate?liberate is a function that turns a method operating on a this value into a function explicitly taking that value as its first argument.
Yep! It's actually insanely useful in many circumstances.
Did you know that the non-mutating array methods actually work on any array-like? It's true! Many people are accustomed to using them like this:
// Get the arguments to this function except the first.
Array.prototype.slice.call(arguments, 1)
But ew, what's with that Array.prototype and call junk? Why can't I just call it like a normal function? Well, you can:
var liberate = require('liberate')
, slice = liberate(Array.prototype.slice)
slice(arguments, 1)
You still have to reference Array.prototype.slice, but you do it once and then you can slice as many things as you want without the verbosity.
No joke. liberate is legitimately useful. Why not make a module of it?
While you're busy repeating yourself, I'll be busy actually coding.
It's not? Oh well. Use the module or don't. It's up to you.
Why am I arguing with myself anyway?
Ripped straight from sinful.js, as I found it useful on its own.
FAQs
Take control of your method's destiny.
The npm package liberate2 receives a total of 9 weekly downloads. As such, liberate2 popularity was classified as not popular.
We found that liberate2 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.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.