New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

tuple

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tuple

Dynamic key object creation utility

latest
npmnpm
Version
0.0.1
Version published
Maintainers
1
Created
Source

tuple

Dynamic key object creation utility.

Installation

$ component install component/tuple
$ npm install tuple

Example

Useful for when you find yourself doing something like:

var obj = {};
obj[someDynamicKey] = 'value';
db.query(obj);

which may now just be:

db.query(tuple(someDynamicKey, 'value));

API

tuple(key, value, ...)

Key / value pairs in sequence.

var t = require('tuple');
var key = 'name';
var obj = t(key, 'tobi');
// => { name: tobi }

License

MIT

Keywords

tuple

FAQs

Package last updated on 30 Aug 2012

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