ezzy-typeof
Advanced tools
Comparing version 0.0.1 to 0.1.10
36
index.js
@@ -1,35 +0,1 @@ | ||
/*! | ||
* Copyright (c) 2016 Moises Romero | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in | ||
* all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
* SOFTWARE. | ||
*/ | ||
/** | ||
* Obtains the true type name of any object | ||
* | ||
* @param {*} obj The element you need the type of | ||
* @param {string} [isType] The type to compare it to (returns boolean response) | ||
* @returns {string|boolean} | ||
*/ | ||
module.exports = (obj, isType) => { | ||
let type = ({}) | ||
.toString | ||
.call(obj) | ||
.match(/\s([a-zA-Z]+)/)[1] | ||
.toLowerCase(); | ||
return isType ? type == isType : type; | ||
}; | ||
module.exports = require('./src/trueTypeOf'); |
{ | ||
"name": "ezzy-typeof", | ||
"version": "0.0.1", | ||
"description": "A true javascript typeof", | ||
"description": "A lightweight package to indicate the true value of an object.", | ||
"version": "0.1.10", | ||
"author": { | ||
"name": "Moises Romero", | ||
"url": "http://ezzygemini.com", | ||
"email": "ezzygemini@gmail.com" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git@github.com:ezzygemini/typeof.git" | ||
"url": "https://github.com/ezzygemini/ezzy-typeof.git" | ||
}, | ||
"scripts": { | ||
"test": "node node_modules/ezzy-testing" | ||
}, | ||
"license": "MIT", | ||
"devDependencies": { | ||
"ezzy-testing": "^0.1.2" | ||
} | ||
} |
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
2
1
5
1183
1
12