@typen/typ
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -5,4 +5,8 @@ 'use strict'; | ||
const OptS = Object.prototype.toString; | ||
/** | ||
* | ||
* @type {Function|function(*):string} | ||
*/ | ||
const protoType = Function.prototype.call.bind(Object.prototype.toString); | ||
/** | ||
* const rxObj = /^\[object (.*)]$/ | ||
@@ -14,5 +18,5 @@ * Equivalent to: Object.prototype.stringify.call(o).match(rxObj)[1] | ||
const typ = o => OptS.call(o).slice(8, -1); | ||
const typ = o => protoType(o).substring(8, -1); | ||
exports.OptS = OptS; | ||
exports.protoType = protoType; | ||
exports.typ = typ; |
@@ -1,3 +0,7 @@ | ||
const OptS = Object.prototype.toString; | ||
/** | ||
* | ||
* @type {Function|function(*):string} | ||
*/ | ||
const protoType = Function.prototype.call.bind(Object.prototype.toString); | ||
/** | ||
* const rxObj = /^\[object (.*)]$/ | ||
@@ -9,4 +13,4 @@ * Equivalent to: Object.prototype.stringify.call(o).match(rxObj)[1] | ||
const typ = o => OptS.call(o).slice(8, -1); | ||
const typ = o => protoType(o).substring(8, -1); | ||
export { OptS, typ }; | ||
export { protoType, typ }; |
{ | ||
"name": "@typen/typ", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "A type cheker", | ||
@@ -32,3 +32,3 @@ "main": "dist/index.cjs.js", | ||
"homepage": "https://github.com/hoyeungw/typen#readme", | ||
"gitHead": "d0fd55ecea305361b1ff7dd19e2ff311f7b46052" | ||
"gitHead": "9b4e2ddb145e45ce721bb778b01ba802ff1d763c" | ||
} |
4017
29