Socket
Socket
Sign inDemoInstall

invert-kv

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

invert-kv - npm Package Compare versions

Comparing version 4.0.0 to 4.1.0

6

index.d.ts

@@ -1,3 +0,1 @@

// TODO: Extend this to symbol when TS allows symbols in index signatures:
// https://github.com/Microsoft/TypeScript/issues/1863
/**

@@ -15,6 +13,6 @@ Invert the key/value of an object.

export default function invertKeyValue<
KeyType extends string | number,
ValueType extends string | number | symbol
KeyType extends PropertyKey,
ValueType extends PropertyKey
>(
object: {[key in KeyType]: ValueType}
): {[key in ValueType]: KeyType extends number ? Exclude<KeyType, number> | string : KeyType};
{
"name": "invert-kv",
"version": "4.0.0",
"version": "4.1.0",
"description": "Invert the key/value of an object. Example: `{foo: 'bar'}` → `{bar: 'foo'}`",

@@ -5,0 +5,0 @@ "license": "MIT",

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