Gathering detailed insights and metrics for graphql-scalar
Gathering detailed insights and metrics for graphql-scalar
Gathering detailed insights and metrics for graphql-scalar
Gathering detailed insights and metrics for graphql-scalar
npm install graphql-scalar
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
23 Stars
28 Commits
2 Forks
3 Watching
14 Branches
1 Contributors
Updated on 22 Sept 2023
TypeScript (98.37%)
JavaScript (1.63%)
Cumulative downloads
Total Downloads
Last day
17.4%
290
Compared to previous day
Last week
-2.5%
1,697
Compared to previous week
Last month
20.5%
6,900
Compared to previous month
Last year
-16.4%
72,412
Compared to previous year
1
Configurable custom GraphQL Scalars (string, number, date, etc) with sanitization / validation / transformation in TypeScript.
TypeScript version (with breaking changes) of the following repos:
joonhocho/graphql-input-number
joonhocho/graphql-input-string
npm install graphql-scalar
or
yarn add graphql-scalar
1import { createStringScalar, createIntScalar, createFloatScalar } from 'graphql-scalar'; 2 3const stringScalar = createStringScalar({ 4 name: string; 5 description?: string; 6 capitalize?: 'characters' | 'words' | 'sentences' | 'first'; 7 collapseWhitespace?: boolean; 8 lowercase?: boolean; 9 maxLength?: number; 10 minLength?: number; 11 nonEmpty?: boolean; 12 pattern?: RegExp | string; 13 singleline?: string; 14 trim?: boolean; 15 trimLeft?: boolean; 16 trimRight?: boolean; 17 truncate?: number; 18 uppercase?: boolean; 19 coerce?: ScalarCoerceFunction<TValue>; 20 errorHandler?: ScalarParseErrorHandler<TInternal, TConfig, TErrorCode>; 21 parse?: ScalarParseFunction<TValue, TInternal>; 22 sanitize?: ScalarSanitizeFunction<TValue>; 23 serialize?: ScalarSerializeFunction<TInternal, TExternal>; 24 validate?: ScalarValidateFunction<TValue>; 25}) 26 27const intScalar = createIntScalar({ 28 name: string; 29 description?: string; 30 maximum?: number; 31 minimum?: number; 32 coerce?: ScalarCoerceFunction<TValue>; 33 errorHandler?: ScalarParseErrorHandler<TInternal, TConfig, TErrorCode>; 34 parse?: ScalarParseFunction<TValue, TInternal>; 35 sanitize?: ScalarSanitizeFunction<TValue>; 36 serialize?: ScalarSerializeFunction<TInternal, TExternal>; 37 validate?: ScalarValidateFunction<TValue>; 38})
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
Found 0/28 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
18 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More