All Projects → mfix22 → gnt

mfix22 / gnt

Licence: MIT License
🍸 GraphQL Normalized Types

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to gnt

url-normalize
URL normalization for Python
Stars: ✭ 82 (+156.25%)
Mutual labels:  normalize, normalization
normalize attributes
Sometimes you want to normalize data before saving it to the database like down casing e-mails, removing spaces and so on. This Rails plugin allows you to do so in a simple way.
Stars: ✭ 41 (+28.13%)
Mutual labels:  normalization
com.iatspayments.civicrm
CiviCRM Extension supporting iATS Payments services
Stars: ✭ 13 (-59.37%)
Mutual labels:  credit-card
PaymentForm
A form that takes credit card and address information. Uses a ported version of jessie pollack's card component.
Stars: ✭ 40 (+25%)
Mutual labels:  credit-card
SwiftyCodeView
Fully customizable UI Component for verification codes written in swift with RxSwift support!
Stars: ✭ 86 (+168.75%)
Mutual labels:  phonenumber
credit card validator
A Dart package that validates credit card numbers, expiration dates, and security codes (CVV/CVC) based on the type of credit card
Stars: ✭ 19 (-40.62%)
Mutual labels:  credit-card
normalize-text
📝 Provides a simple API to normalize texts, whitespaces, paragraphs & diacritics.
Stars: ✭ 54 (+68.75%)
Mutual labels:  normalize
enelvo
A flexible normalizer for user-generated content
Stars: ✭ 28 (-12.5%)
Mutual labels:  normalization
ember-credit-card
"make your credit card form dreamy in one line of code"
Stars: ✭ 89 (+178.13%)
Mutual labels:  credit-card
credit-card-example
An example of credit card made by using Rivets Js
Stars: ✭ 23 (-28.12%)
Mutual labels:  credit-card
frames-android
Checkout API Client, Payment Form UI and Utilities
Stars: ✭ 26 (-18.75%)
Mutual labels:  credit-card
BlockEditText
Block EditText is a library provide an input view present in multiple block style that common use in TAC or credit card field.
Stars: ✭ 113 (+253.13%)
Mutual labels:  credit-card
normalize-pkg
Normalize values in package.json to improve compatibility, programmatic readability and usefulness with third party libs.
Stars: ✭ 18 (-43.75%)
Mutual labels:  normalize
TextDatasetCleaner
🔬 Очистка датасетов от мусора (нормализация, препроцессинг)
Stars: ✭ 27 (-15.62%)
Mutual labels:  normalization
pyamex
Python library for accessing American Express account data
Stars: ✭ 15 (-53.12%)
Mutual labels:  credit-card
SwitchNorm Detection
The code of Switchable Normalization for object detection based on Detectron.pytorch.
Stars: ✭ 79 (+146.88%)
Mutual labels:  normalization
pytorch-frn
Filter Response Normalization Layer in PyTorch
Stars: ✭ 110 (+243.75%)
Mutual labels:  normalization
card-validator
Card validation helpers for payment forms.
Stars: ✭ 22 (-31.25%)
Mutual labels:  credit-card
RNAseq titration results
Cross-platform normalization enables machine learning model training on microarray and RNA-seq data simultaneously
Stars: ✭ 22 (-31.25%)
Mutual labels:  normalization
vgs-collect-ios
VGS Collect iOS SDK
Stars: ✭ 17 (-46.87%)
Mutual labels:  credit-card

GraphQL Normalized Types 🍸

The gin-n-tonic of GraphQL types: simple, final, clean. Normalize your common data with GraphQL Scalar types.

tested with jest lerna contributions welcome

Usage

$ npm install --save gnt

and then add to your schema:

const { Phone, UnixDate, CreditCard, State, ZipCode, DriversLicense } = require('gnt')
const { makeExecutableSchema } = require('graphql-tools');

makeExecutableSchema({ 
  typeDefs: schemaString, 
  resolvers: {
    Phone,
    UnixDate,
    CreditCard,
    USState: State,
    ZipCode,
    DriversLicense
  }
});

Examples

Each of these types can be installed individually using there 'Package Name' shown below

Type Package Name Input Example Output Example
Phone graphql-types-phone '(817) 569-8900' '+18175698900'
Zipcode graphql-types-zipcode '55902', 00000 '55902', null
UnixDate graphql-types-unix-timestamp 2017-05-07T14:47:59.438, Date 1494186489
CreditCard graphql-types-credit-card '4111111111111111' { number: '4111111111111111', cardType: 'VISA', validCVV: false, validExpiryMonth: false, validExpiryYear: false, isExpired: true }
NonEmptyString graphql-types-non-empty-string '' null
Drivers License graphql-types-drivers-license { state: 'CA', license: 'B2347354' } { state: 'CA', license: 'B2347354' } OR null

Enum Types

Type Package Name Input Example
USState graphql-types-us-state US, CA, DE ...

Contributing

Contributions are more than welcome! This repo is not meant to be owned by me (and if there is a more suitable owner please let me know), but rather by the commuity.

Creating a new type

First run:

$ npm run generate -- '<your type name>'

to get started. A folder with index.js, index.spec.js (your test), and a package.json will be created for you! Then run npm run link and you should be on your way.

If you have any idea for new types, please submit an issue or PR!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].