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

react-display-name

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-display-name - npm Package Compare versions

Comparing version 0.2.0 to 0.2.3

lib/spec/getDislplayNameSpec.js

13

lib/getDisplayName.js
'use strict';
exports.__esModule = true;
var getDisplayName = function getDisplayName(Component) {
return Component.displayName || Component.name || (typeof Component === 'string' ? Component : 'Component');
};
exports.default = getDisplayName;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = getDisplayName;
function getDisplayName(Component) {
return Component.displayName || Component.name || (typeof Component === 'string' && Component.length > 0 ? Component : 'Unknown');
}
{
"name": "react-display-name",
"version": "0.2.0",
"version": "0.2.3",
"description": "utility to return a react components display name",
"main": "./lib/getDisplayName.js",
"files": [
"lib"
],
"scripts": {
"build": "npm run clean && npm run lint && npm run build:lib && npm run build:spec",
"build:lib": "mkdirp lib && babel src -d lib",
"build:spec": "mkdirp lib/spec && babel spec -d lib/spec",
"test": "npm run build:spec && mocha 'lib/spec/*Spec.js'",
"build": "npm run clean && npm run lint && npm run build:lib && npm run build:spec",
"clean": "rimraf lib",
"lint": "eslint src"
"lint": "eslint src",
"prepublish": "npm run build",
"test": "npm run build:spec && mocha 'lib/spec/*Spec.js'"
},

@@ -30,19 +34,13 @@ "repository": {

"devDependencies": {
"babel": "^6.5.2",
"babel-cli": "^6.7.7",
"babel-core": "^6.7.7",
"babel-eslint": "^6.0.4",
"babel-loader": "^6.2.4",
"babel-preset-es2015": "^6.6.0",
"babel-preset-es2015-loose": "^7.0.0",
"babel-preset-react": "^6.5.0",
"babel-preset-stage-0": "^6.5.0",
"chai": "^3.5.0",
"eslint": "^2.8.0",
"eslint-config-airbnb": "8.0.0",
"eslint-plugin-import": "^1.6.1",
"eslint-plugin-jsx-a11y": "^1.0.3",
"eslint-plugin-react": "^5.0.1",
"babel-cli": "^6.24.1",
"babel-eslint": "^7.2.3",
"babel-preset-env": "^1.6.0",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-2": "^6.24.1",
"chai": "^4.1.0",
"eslint": "4.3.0",
"eslint-plugin-import": "^2.2.0",
"eslint-plugin-react": "7.1.0",
"mkdirp": "^0.5.1",
"mocha": "^2.4.5",
"mocha": "3.4.2",
"react": "^15.0.1",

@@ -49,0 +47,0 @@ "rimraf": "^2.5.2"

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