graphql-input-number
Advanced tools
Comparing version 0.0.8 to 0.0.9
@@ -7,2 +7,4 @@ 'use strict'; | ||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
var _graphql = require('graphql'); | ||
@@ -14,2 +16,4 @@ | ||
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } | ||
// https://github.com/graphql/graphql-js/blob/master/src/type/scalars.js | ||
@@ -40,2 +44,4 @@ | ||
var options = _objectWithoutProperties(_ref, ['error', 'max', 'min', 'parse', 'sanitize', 'test', 'name']); | ||
if (!name) { | ||
@@ -111,3 +117,3 @@ throw new Error('"name" is required'); | ||
return new _graphql.GraphQLScalarType({ | ||
return new _graphql.GraphQLScalarType(_extends({ | ||
name: name, | ||
@@ -125,3 +131,3 @@ serialize: coerceFloat, | ||
} | ||
}); | ||
}, options)); | ||
}; |
@@ -7,2 +7,4 @@ 'use strict'; | ||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
var _graphql = require('graphql'); | ||
@@ -14,2 +16,4 @@ | ||
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } | ||
// https://github.com/graphql/graphql-js/blob/master/src/type/scalars.js | ||
@@ -42,2 +46,4 @@ var MAX_INT = 2147483647; | ||
var options = _objectWithoutProperties(_ref, ['error', 'max', 'min', 'parse', 'sanitize', 'test', 'name']); | ||
if (!name) { | ||
@@ -113,3 +119,3 @@ throw new Error('"name" is required'); | ||
return new _graphql.GraphQLScalarType({ | ||
return new _graphql.GraphQLScalarType(_extends({ | ||
name: name, | ||
@@ -127,3 +133,3 @@ serialize: coerceInt, | ||
} | ||
}); | ||
}, options)); | ||
}; |
{ | ||
"name": "graphql-input-number", | ||
"version": "0.0.8", | ||
"version": "0.0.9", | ||
"description": "A configurable custom input number type for GraphQL with sanitization and validation.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
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
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
13545
6
223
0
129
1