Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

better-type-of

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

better-type-of - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

13

index.js

@@ -1,7 +0,8 @@

export const isCapital = (c) => /[A-Z]/.test(c)
function isCapital(c) { return /[A-Z]/.test(c); }
export const toLowerCase = (s) => {
// handles strings with acronyms: 'HTMLDocument' => 'html document'
function toLowerCase(s) {
return s
.split('')
.map((c, i) => {
.map(function(c, i) {
if (!isCapital(c)) {

@@ -21,4 +22,8 @@ return c;

export default function typeOf(value) {
module.exports = function typeOf(value) {
return toLowerCase(Object.prototype.toString.call(value).slice(8, -1));
}
module.exports.isCapital = isCapital;
module.exports.toLowerCase = toLowerCase;
{
"name": "better-type-of",
"version": "0.0.1",
"version": "0.0.2",
"description": "A better type of",

@@ -28,4 +28,3 @@ "keywords": [

"babel-preset-es2015-node6": "^0.2.0",
"babel-preset-stage-0": "^6.5.0",
"webpack": "^1.13.0"
"babel-preset-stage-0": "^6.5.0"
},

@@ -32,0 +31,0 @@ "ava": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc