Skip to content

Instantly share code, notes, and snippets.

View Frulko's full-sized avatar
🦁

Guillaume Dumoulin Frulko

🦁
View GitHub Profile
@Frulko
Frulko / compare.js
Last active August 29, 2015 14:16 — forked from alexey-bass/compare.js
/**
* Simply compares two string version values.
*
* Example:
* versionCompare('1.1', '1.2') => -1
* versionCompare('1.1', '1.1') => 0
* versionCompare('1.2', '1.1') => 1
* versionCompare('2.23.3', '2.22.3') => 1
*
* Returns:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>Title</title>
<link href="css/some-stylesheet.css" rel="stylesheet"/>
<script src="scripts/some-script.js"/>
<script>
</script>
</head>