New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

array-to-object-keys

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

array-to-object-keys - npm Package Compare versions

Comparing version 1.0.12 to 1.0.13

13

index.d.ts
/**
* @typedef valueGenerator
* @type {function}
* @param {string} value The original array entry
* @param {number} index The index of the array entry (starts at 0)
* @returns {*}
*/
declare type valueGenerator = (value: string, index: number) => any;
/**
* Converts an array to an object with static keys and customizable values

@@ -13,8 +22,8 @@ * @example

* @param {string[]} array Keys for the generated object
* @param {function(value, index)|*} [valueGenerator] Optional function that sets the object values based on key and index
* @param {valueGenerator|*} [valueGenerator=null] Optional function that sets the object values based on key and index
* @returns {Object<string, *>} A generated object based on the array input
*/
declare function default(array: string[], valueGenerator?: ((...params: any[]) => any) | any): {
declare function default(array: string[], valueGenerator?: valueGenerator | any): {
[key: string]: any;
};

2

index.js
/*!
*** array-to-object-keys 1.0.12
*** array-to-object-keys 1.0.13
*** Copyright © 2019, Jaid <jaid.jsx@gmail.com> (https://github.com/Jaid)

@@ -4,0 +4,0 @@ *** Licensed under MIT

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

{"author":{"name":"Jaid","email":"jaid.jsx@gmail.com","url":"https://github.com/Jaid"},"bugs":"https://github.com/Jaid/array-to-object-keys/issues","description":"Converts an array to an object where the keys are the array entries and the values are customizable in a function.","homepage":"https://array-to-object-keys.jaid.codes","keywords":["array","array-manipulations","array-map","convert","javascript-array","javascript-object","keys","lang","object","values"],"license":"MIT","name":"array-to-object-keys","repository":"github:Jaid/array-to-object-keys","types":"index.d.ts","version":"1.0.12"}
{"author":{"name":"Jaid","email":"jaid.jsx@gmail.com","url":"https://github.com/Jaid"},"bugs":"https://github.com/Jaid/array-to-object-keys/issues","description":"Converts an array to an object where the keys are the array entries and the values are customizable in a function.","homepage":"https://array-to-object-keys.jaid.codes","keywords":["array","array-manipulations","array-map","convert","javascript-array","javascript-object","keys","lang","object","values"],"license":"MIT","name":"array-to-object-keys","repository":"github:Jaid/array-to-object-keys","types":"index.d.ts","version":"1.0.13"}
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