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

Evaluate some String and Array instance methods at compile time #505

Merged
merged 11 commits into from
Jun 13, 2017
Prev Previous commit
Next Next commit
Pacify prettier
j-f1 committed Jun 8, 2017
commit 8c7604c569364cbb00522311ea81e43413a4a34a
Original file line number Diff line number Diff line change
@@ -117,9 +117,11 @@ module.exports = ({ types: t }) => {
},
charAt: defaultZero(({ value }, i) => t.stringLiteral(value.charAt(i))),
charCodeAt: defaultZero(({ value }, i) =>
t.numericLiteral(value.charCodeAt(i))),
t.numericLiteral(value.charCodeAt(i))
),
codePointAt: defaultZero(({ value }, i) =>
t.numericLiteral(value.codePointAt(i)))
t.numericLiteral(value.codePointAt(i))
)
}
}
};