Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cache constant variables #30

Merged
merged 1 commit into from
Jul 23, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions api.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
!function(esta) {
var api = create()
var nombre = "numerologia"
typeof module != "undefined" && module.exports
? module.exports = api
: esta[nombre] = api
var latin = "abcdefghijklmnopqrstuvwxyz"
var join = "".join
var split = "".split
var lower = "".toLowerCase
var digit = /^\d+$/
var round = Math.round
var repeating = /^(.)\1+$/
var glyph = /[\u0300-\u036f]/g
var norm = "".normalize

function create(bet) {
var latin = "abcdefghijklmnopqrstuvwxyz"
var join = "".join
var split = "".split
var lower = "".toLowerCase
var digit = /^\d+$/
var round = Math.round
var repeating = /^(.)\1+$/
var glyph = /[\u0300-\u036f]/g
var norm = "".normalize
var base = norm ? bass : basic
bet = bet ? lower.call(bet) : latin

Expand Down Expand Up @@ -93,7 +88,12 @@
api.root = raiz
api.sum = suma
api.suma = suma

return api
}

var api = create()
var nombre = "numerologia"
typeof module != "undefined" && module.exports
? module.exports = api
: esta[nombre] = api
}(this)