1
1
// Determine the type of a variable/object.
2
- export const objType = function ( obj ) {
2
+ export const objType = function objType ( obj ) {
3
3
var type = typeof obj ;
4
4
if ( type === 'undefined' ) return 'undefined' ;
5
5
else if ( type === 'string' || obj instanceof String ) return 'string' ;
@@ -12,7 +12,7 @@ export const objType = function(obj) {
12
12
} ;
13
13
14
14
// Create an HTML element with optional className, innerHTML, and style.
15
- export const createElement = function ( tagName , opt ) {
15
+ export const createElement = function createElement ( tagName , opt ) {
16
16
var el = document . createElement ( tagName ) ;
17
17
if ( opt . className ) el . className = opt . className ;
18
18
if ( opt . innerHTML ) {
@@ -29,7 +29,7 @@ export const createElement = function(tagName, opt) {
29
29
} ;
30
30
31
31
// Deep-clone a node and preserve contents/properties.
32
- export const cloneNode = function ( node , javascriptEnabled ) {
32
+ export const cloneNode = function cloneNode ( node , javascriptEnabled ) {
33
33
// Recursively clone the node.
34
34
var clone = node . nodeType === 3 ? document . createTextNode ( node . nodeValue ) : node . cloneNode ( false ) ;
35
35
for ( var child = node . firstChild ; child ; child = child . nextSibling ) {
@@ -60,7 +60,7 @@ export const cloneNode = function(node, javascriptEnabled) {
60
60
}
61
61
62
62
// Convert units from px using the conversion value 'k' from jsPDF.
63
- export const unitConvert = function ( obj , k ) {
63
+ export const unitConvert = function unitConvert ( obj , k ) {
64
64
if ( objType ( obj ) === 'number' ) {
65
65
return obj * 72 / 96 / k ;
66
66
} else {
0 commit comments