Skip to content

Commit 126eee1

Browse files
authored
cache constant variables (#30)
1 parent ae99968 commit 126eee1

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

api.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,15 @@
11
!function(esta) {
2-
var api = create()
3-
var nombre = "numerologia"
4-
typeof module != "undefined" && module.exports
5-
? module.exports = api
6-
: esta[nombre] = api
2+
var latin = "abcdefghijklmnopqrstuvwxyz"
3+
var join = "".join
4+
var split = "".split
5+
var lower = "".toLowerCase
6+
var digit = /^\d+$/
7+
var round = Math.round
8+
var repeating = /^(.)\1+$/
9+
var glyph = /[\u0300-\u036f]/g
10+
var norm = "".normalize
711

812
function create(bet) {
9-
var latin = "abcdefghijklmnopqrstuvwxyz"
10-
var join = "".join
11-
var split = "".split
12-
var lower = "".toLowerCase
13-
var digit = /^\d+$/
14-
var round = Math.round
15-
var repeating = /^(.)\1+$/
16-
var glyph = /[\u0300-\u036f]/g
17-
var norm = "".normalize
1813
var base = norm ? bass : basic
1914
bet = bet ? lower.call(bet) : latin
2015

@@ -93,7 +88,12 @@
9388
api.root = raiz
9489
api.sum = suma
9590
api.suma = suma
96-
9791
return api
9892
}
93+
94+
var api = create()
95+
var nombre = "numerologia"
96+
typeof module != "undefined" && module.exports
97+
? module.exports = api
98+
: esta[nombre] = api
9999
}(this)

0 commit comments

Comments
 (0)