Skip to content

Instantly share code, notes, and snippets.

View Yurko-Fedoriv's full-sized avatar

Yura Fedoriv Yurko-Fedoriv

  • Nutritionix
  • Kyiv, Ukraine
View GitHub Profile
@Yurko-Fedoriv
Yurko-Fedoriv / check-UPC-digit.js
Created February 28, 2019 15:49
UPC check digit function that validates the check digit on a UPC
function reverse(string) {
return string
.split('')
.reverse()
.join('');
}
// function to calculate EAN / UPC checkdigit
function eanCheckDigit(s) {
var result = 0;
@Yurko-Fedoriv
Yurko-Fedoriv / angular-snap-engage.js
Created June 21, 2019 11:55
Snap Engage Integration for Angular 1
(function (window, document, angular, undefined) {
'use strict';
angular.module('angular-snap-engage', [])
.provider('SnapEngage', function () {
var account,
created = false;
/**
* Configuration Methods
**/