1 | /**
|
2 | *
|
3 | * @type {Function|function(*):string}
|
4 | */
|
5 | const protoType = Function.prototype.call.bind(Object.prototype.toString);
|
6 | /**
|
7 | * const rxObj = /^\[object (.*)]$/
|
8 | * Equivalent to: Object.prototype.stringify.call(o).match(rxObj)[1]
|
9 | * @param {*} o
|
10 | * @return {string}
|
11 | */
|
12 |
|
13 | const typ = o => protoType(o).slice(8, -1);
|
14 |
|
15 | export { protoType, typ };
|