Skip to content

Commit d442550

Browse files
committed
es5
1 parent f6891c7 commit d442550

File tree

3 files changed

+20
-17
lines changed

3 files changed

+20
-17
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2017 Ramesh Kumar
3+
Copyright (c) 2018 Ramesh Kumar
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

index.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
var ASSIGN = (function(GLOBAL_APP_CONFIG, GLOBAL_METHODS) {
22

3-
const baseTypes = ['string', 'number', 'boolean', 'undefined'];
3+
var baseTypes = ['string', 'number', 'boolean', 'undefined'];
44

55
function func(ab, bb, noob) {
66
if (typeof ab !== 'object' || !ab) ab = Array.isArray(bb) ? new Array(bb.length) : {};
@@ -41,10 +41,10 @@ var IS_AN = (function(GLOBAL_APP_CONFIG, GLOBAL_METHODS) {
4141
});
4242
var WALK = (function(GLOBAL_APP_CONFIG, GLOBAL_METHODS) {
4343
if (typeof GLOBAL_APP_CONFIG !== 'object' || GLOBAL_APP_CONFIG === null) GLOBAL_APP_CONFIG = {};
44-
const maxobjdepth = GLOBAL_APP_CONFIG.maxobjdepth || 99;
45-
const endvar = GLOBAL_APP_CONFIG.walkendkey || '$W_END';
44+
var maxobjdepth = GLOBAL_APP_CONFIG.maxobjdepth || 99;
45+
var endvar = GLOBAL_APP_CONFIG.walkendkey || '$W_END';
4646

47-
let ifEndForObjWalk = GLOBAL_METHODS && GLOBAL_METHODS.ifEndForObjWalk;
47+
var ifEndForObjWalk = GLOBAL_METHODS && GLOBAL_METHODS.ifEndForObjWalk;
4848
if (typeof ifEndForObjWalk !== 'function') {
4949
ifEndForObjWalk = function(obj, depth) {
5050
return ((depth < maxobjdepth && typeof obj === 'object' &&
@@ -53,10 +53,10 @@ var WALK = (function(GLOBAL_APP_CONFIG, GLOBAL_METHODS) {
5353
};
5454
};
5555

56-
let isPOJO = GLOBAL_METHODS && GLOBAL_METHODS.isPOJO;
56+
var isPOJO = GLOBAL_METHODS && GLOBAL_METHODS.isPOJO;
5757
if (typeof isPOJO !== 'function') {
58-
const ProtoObj = Object.prototype;
59-
const getProtOf = Object.getPrototypeOf;
58+
var ProtoObj = Object.prototype;
59+
var getProtOf = Object.getPrototypeOf;
6060

6161
isPOJO = function func(obj) {
6262
if (obj === null || typeof obj !== 'object') {
@@ -66,15 +66,15 @@ var WALK = (function(GLOBAL_APP_CONFIG, GLOBAL_METHODS) {
6666
};
6767
};
6868

69-
const walkInto = function(fun, rt, obj, key, depth, isLast) {
69+
var walkInto = function(fun, rt, obj, key, depth, isLast) {
7070
if (!depth) depth = 0;
7171
fun(obj, key, rt, depth || 0, typeof isLast === 'boolean' ? isLast : true);
72-
const ob = ifEndForObjWalk(obj, depth);
72+
var ob = ifEndForObjWalk(obj, depth);
7373
if (ob) {
74-
const kys = Object.keys(ob);
75-
const lastln = kys.length - 1;
76-
const deep = depth + 1;
77-
for (let z = 0; z <= lastln; z += 1) {
74+
var kys = Object.keys(ob);
75+
var lastln = kys.length - 1;
76+
var deep = depth + 1;
77+
for (var z = 0; z <= lastln; z += 1) {
7878
walkInto(fun, ob, ob[kys[z]], kys[z], deep, (z === lastln));
7979
}
8080
}
@@ -85,7 +85,7 @@ var WALK = (function(GLOBAL_APP_CONFIG, GLOBAL_METHODS) {
8585
var WRAP = (function(GLOBAL_APP_CONFIG, GLOBAL_METHODS) {
8686
if (typeof GLOBAL_APP_CONFIG !== 'object' || GLOBAL_APP_CONFIG === null) GLOBAL_APP_CONFIG = {};
8787

88-
const START_VAR = GLOBAL_APP_CONFIG.startvar || '\{\{',
88+
var START_VAR = GLOBAL_APP_CONFIG.startvar || '\{\{',
8989
END_VAR = GLOBAL_APP_CONFIG.endvar || '\}\}',
9090
SVAR_L = START_VAR.length,
9191
EVAR_L = END_VAR.length,
@@ -96,7 +96,7 @@ var WRAP = (function(GLOBAL_APP_CONFIG, GLOBAL_METHODS) {
9696
FUNC_REG = GLOBAL_APP_CONFIG.functionregex ||
9797
new RegExp('\(' + START_VAR + '\[a-zA-Z0-9\_\]+\\(\.\*\?\\)' + END_VAR + '\)\+', 'g');
9898

99-
const WALK_INTO = GLOBAL_METHODS.objwalk,
99+
var WALK_INTO = GLOBAL_METHODS.objwalk,
100100
IS_ALPHA_NUM = GLOBAL_METHODS.isAlphaNum,
101101
ASSIGN = GLOBAL_METHODS.assign;
102102

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "templist",
3-
"version": "0.0.6",
3+
"version": "0.0.7",
44
"description": "The template master.",
55
"repository": {
66
"type": "git",
@@ -16,6 +16,9 @@
1616
"function",
1717
"dynamic"
1818
],
19+
"engines": {
20+
"node": ">=0.10.48"
21+
},
1922
"author": "Ramesh Kumar <[email protected]>",
2023
"license": "MIT",
2124
"bugs": {

0 commit comments

Comments
 (0)