Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

keyf

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

keyf

key formatter based on a function's arguments

  • 0.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
28
decreased by-28.21%
Maintainers
1
Weekly downloads
 
Created
Source

keyf

Key formatter for function arguments

Usage

var keyf = require('keyf')
var formatter = keyf('some-prefix:{_abc_}:{0}:{this.foo}:{1.bar}', {
  '_abc_': 'pre-defined-value'
})

User.prototype.foo = 'abc'

User.prototype.cacheKey = function() {
 return formatter.call(this, arguments)
}
var user = new User()

user.cacheKey(1, { bar: '2' })
// -> some-prefix:pre-defined-value:1:abc:2

License

the MIT license.

Keywords

FAQs

Package last updated on 24 Mar 2014

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc