This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Utils = { | |
// Detect if support local storage | |
supports_html5_storage: function () { | |
try { | |
localStorage.setItem('testKey', 'test'); | |
localStorage.removeItem('testKey'); | |
return true; | |
} catch (e) { | |
return false; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Utils = { | |
// Shuffle array | |
shuffle: function (o) { | |
for(var j, x, i = o.length; i; j = Math.floor(Math.random() * i), x = o[--i], o[i] = o[j], o[j] = x); | |
return o; | |
}, | |
// Get random number in range | |
getRandomInt: function (min, max) { | |
return Math.floor(Math.random() * (max - min + 1)) + min; | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Validation Function | |
*/ | |
ValidationContactForm = { | |
clear: function () { | |
Validations.clear(['name', 'email', 'subject', 'message']); | |
Validations.clear(['contactFormSuccess'], true); | |
}, | |
setError: function (inputError, message) { | |
return Session.set(inputError, message); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: mit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: mit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: mit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: mit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: mit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: mit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
<details><summary>[mode](/concepts/mode): "production", // "production" | "development" | "none"</summary> | |
[mode](/concepts/mode): "production", // enable many optimizations for production builds | |
[mode](/concepts/mode): "development", // enabled useful tools for development | |
[mode](/concepts/mode): "none", // no defaults | |
</details> | |
// Chosen mode tells webpack to use its built-in optimizations accordingly. | |
<details><summary>[entry](/configuration/entry-context#entry): "./app/entry", // string | object | array</summary> | |
[entry](/configuration/entry-context#entry): ["./app/entry1", "./app/entry2"], | |
[entry](/configuration/entry-context#entry): { |
OlderNewer