How to use the creditcards.expiration.month function in creditcards

To help you get started, we’ve selected a few creditcards examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github bendrucker / angular-credit-cards / src / expiration.js View on Github external
'use strict'

var expiration = require('creditcards').expiration
var month = expiration.month
var year = expiration.year
var ap = require('ap')

exports = module.exports = function ccExp () {
  return {
    restrict: 'AE',
    require: 'ccExp',
    controller: CcExpController,
    link: function (scope, element, attributes, ccExp) {
      ccExp.$watch()
    }
  }
}

CcExpController.$inject = ['$scope', '$element']
function CcExpController ($scope, $element) {