mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-14 05:21:24 +00:00
Add bindings for String.prototype.replace
This commit is contained in:
@ -1 +1,7 @@
|
||||
exports.new_string_object = () => new String("hi");
|
||||
exports.new_string_object = () => new String("hi");
|
||||
|
||||
exports.get_replacer_function = function() {
|
||||
return function upperToHyphenLower(match, offset, string) {
|
||||
return (offset > 0 ? '-' : '') + match.toLowerCase();
|
||||
};
|
||||
};
|
||||
|
Reference in New Issue
Block a user