electron/spec/fixtures/module/print_name.js
2016-07-25 16:30:40 +09:00

15 lines
283 B
JavaScript

exports.print = function (obj) {
return obj.constructor.name
}
exports.echo = function (obj) {
return obj
}
exports.typedArray = function (name) {
const int16 = new Int16Array(name.length)
for (let i = 0; i < name.length; ++i) {
int16[i] = name[i]
}
return int16
}