Socket
Socket
Sign inDemoInstall

dataloader-align-results

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dataloader-align-results - npm Package Compare versions

Comparing version 0.2.1 to 0.3.0

3

CHANGELOG.md
# Change Log
## [v0.2.1](https://github.com/eddyystop/dataloader-align-results/tree/v0.2.1) (2017-10-06)
[Full Changelog](https://github.com/eddyystop/dataloader-align-results/compare/v0.2.0...v0.2.1)
## [v0.2.0](https://github.com/eddyystop/dataloader-align-results/tree/v0.2.0) (2017-10-06)

@@ -4,0 +7,0 @@ [Full Changelog](https://github.com/eddyystop/dataloader-align-results/compare/v0.1.0...v0.2.0)

const debug = require('debug')('dataloader-align-results');
// Note that we cannot cannot verify []! or [!]! contain any non-null elements as

@@ -30,2 +32,4 @@ // the DataLoader forms the final Array from elements we return here and elements in the cache.

return function dataLoaderAlignResultsInner (keys, resultArray) {
debug('started', keys, resultArray);
if (resultArray === null) resultArray = [];

@@ -67,3 +71,3 @@ if (typeof resultArray === 'object' && !Array.isArray(resultArray)) resultArray = [resultArray];

// return [null, [{id: 2, bar: 12}], null, [{id: 1, bar: 10}, {id: 1, bar: 11}]
return keys.map((key, i) => {
const result = keys.map((key, i) => {
const serializedKey = serializeDataLoaderKey(key);

@@ -78,3 +82,6 @@ const value = hash[serializedKey] || null;

});
debug('result=', result);
return result;
};
};

2

package.json
{
"name": "dataloader-align-results",
"description": "Takes your back-end results and returns an Array acceptable to DataLoader.",
"version": "0.2.1",
"version": "0.3.0",
"homepage": "https://github.com/eddyystop/dataloader-align-results",

@@ -6,0 +6,0 @@ "main": "lib/",

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