Converts an array to an object where the keys are the array entries and the values are customizable in a function.
npm install --save array-to-object-keys@^1.3.7
yarn add array-to-object-keys@^1.3.7
(if configured properly)
npm install --save @jaid/array-to-object-keys@^1.3.7
const array = "a" "b"const result =
result will now be:
a: "value for a #1"b: "value for b #2"
git clone email@example.com:jaid/array-to-object-keys.gitcd array-to-object-keysnpm install
npm run test:dev
Testing in production environment:
npm run test
MIT LicenseCopyright © 2020, Jaid <firstname.lastname@example.org> (github.com/jaid)Permission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in allcopies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THESOFTWARE.