@codegateinc/g-utils
Advanced tools
Comparing version 0.0.23 to 0.0.24
@@ -61,3 +61,5 @@ "use strict"; | ||
const fromPairs = subject => Object.fromEntries(subject); | ||
const fromPairs = subject => subject.reduce((acc, [key, value]) => ({ ...acc, | ||
[key]: value | ||
}), {}); | ||
@@ -64,0 +66,0 @@ exports.fromPairs = fromPairs; |
@@ -6,3 +6,3 @@ { | ||
"typings": "index.d.ts", | ||
"version": "0.0.23", | ||
"version": "0.0.24", | ||
"main": "dist/index.js", | ||
@@ -20,3 +20,3 @@ "description": "This library is a package of useful functions", | ||
"@babel/cli": "7.8.4", | ||
"@babel/core": "7.8.4", | ||
"@babel/core": "7.8.7", | ||
"@babel/plugin-transform-modules-commonjs": "7.8.3", | ||
@@ -23,0 +23,0 @@ "@babel/preset-typescript": "7.8.3", |
@@ -37,3 +37,6 @@ import { KeyValuePair, CondItem } from './types' | ||
export const toPairs = <T extends {}>(subject: KeyValuePair) => Object.entries<T>(subject) | ||
export const fromPairs = <T extends {}>(subject: Array<[string, any]>): T => Object.fromEntries(subject) | ||
export const fromPairs = <T extends {}>(subject: Array<[string, any]>): T => subject.reduce((acc, [key, value]) => ({ | ||
...acc, | ||
[key]: value | ||
}), {} as T) | ||
@@ -40,0 +43,0 @@ export const clearObject = (subject: KeyValuePair) => compose( |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
22145
473
0