added unit testing, and started implementing unit tests...phew
This commit is contained in:
+12
@@ -0,0 +1,12 @@
|
||||
"use strict";
|
||||
|
||||
var o = Object.prototype;
|
||||
|
||||
function getClass(value) {
|
||||
// Returns the internal [[Class]] by calling Object.prototype.toString
|
||||
// with the provided value as this. Return value is a string, naming the
|
||||
// internal class, e.g. "Array"
|
||||
return o.toString.call(value).split(/[ \]]/)[1];
|
||||
}
|
||||
|
||||
module.exports = getClass;
|
||||
Reference in New Issue
Block a user