PluginProbe
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder / 3.6.61
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder v3.6.61
6.2.14 6.2.13 6.2.12 6.2.10 6.2.11 6.2.9 6.2.8 6.2.7 6.2.6 6.2.5 6.2.4 6.2.3 6.2.2 3.6.22 3.6.31 3.6.40 3.6.41 3.6.42 3.6.50 3.6.51 3.6.60 3.6.61 3.6.62 3.6.64 3.6.65 All 196 releases
fluentform / resources / assets / admin / helpers.js

helpers.js in Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder 3.6.61, at resources/assets/admin/helpers.js

41 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /*
2 Funciton Type: Array Function
3 Usage: Helps to clone an item next to it.
4 */
5 if (typeof Array.prototype.pushAfter === "undefined") {
6 Array.prototype.pushAfter = function(index, item) {
7 var deepClone = JSON.parse(JSON.stringify(item));
8 this.splice(index + 1, 0, deepClone);
9 };
10 }
11
12 if (typeof String.prototype.ucFirst === "undefined") {
13 String.prototype.ucFirst = function() {
14 return this.charAt(0).toUpperCase() + this.slice(1);
15 }
16 }
17
18 if (typeof String.prototype.ucWords === "undefined") {
19 String.prototype.ucWords = function() {
20 return this.split(' ').map(word => {
21 return word.charAt(0).toUpperCase() + word.slice(1)
22 }).join(' ');
23 }
24 }
25
26 // import lodash methods
27 // and assign it as prefixed property to window object
28 window._ff = {
29 includes: require('lodash/includes'),
30 startCase: require('lodash/startCase'),
31 map: require('lodash/map'),
32 each: require('lodash/each'),
33 chunk: require('lodash/chunk'),
34 has: require('lodash/has'),
35 snakeCase: require('lodash/snakeCase'),
36 cloneDeep: require('lodash/cloneDeep'),
37 filter: require('lodash/filter'),
38 isEmpty: require('lodash/isEmpty'),
39 unique: (value, index, self) => self.indexOf(value) === index
40 };
41