Socket
Socket
Sign inDemoInstall

@coderich/graphql-shape

Package Overview
Dependencies
8
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.2.7 to 2.3.0

4

package.json

@@ -9,3 +9,3 @@ {

],
"version": "2.2.7",
"version": "2.3.0",
"author": "coderich",

@@ -26,3 +26,3 @@ "main": "src/GraphQLShape.js",

"dependencies": {
"@coderich/util": "1.0.2",
"@coderich/util": "1.0.4",
"jsonpath-plus": "^8.0.0",

@@ -29,0 +29,0 @@ "lodash.get": "4.4.2"

@@ -126,2 +126,3 @@ # GraphQLShape

`default` | Value(s) | Return *first* **! == null** value from [value, ...values]
`filter` | RegExp | Filter an array of values that match a given RegExp
`pick` | Key(s) | Pick only the key(s) you want from the field/object

@@ -128,0 +129,0 @@ `pairs` | null | Transform flat array to 2D elements of 2 (pair) length

@@ -46,9 +46,10 @@ const get = require('lodash.get');

// Utility methods
exports.get = get;
exports.set = Util.set;
exports.nvl = Util.nvl;
exports.uvl = Util.uvl;
exports.pairs = Util.pairs;
exports.flatten = Util.flatten;
exports.unflatten = Util.unflatten;
exports.get = (...args) => get(...args);
exports.set = (...args) => Util.set(...args);
exports.nvl = (...args) => Util.nvl(...args);
exports.uvl = (...args) => Util.uvl(...args);
exports.pairs = (...args) => Util.pairs(...args);
exports.flatten = (...args) => Util.flatten(...args);
exports.unflatten = (...args) => Util.unflatten(...args);
exports.filter = (v, re) => v.filter(el => el.match(Util.parseRegExp(re)));
exports.default = (v, ...args) => Util.ensureArray(v).concat(args.flat()).find(el => el != null);

@@ -55,0 +56,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc