Socket
Socket
Sign inDemoInstall

@instructure/ui-utils

Package Overview
Dependencies
Maintainers
26
Versions
1979
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@instructure/ui-utils - npm Package Compare versions

Comparing version 4.1.0-dev.1 to 4.1.0

1

lib/react/ComponentIdentifier.js

@@ -101,2 +101,3 @@ 'use strict';

ComponentIdentifier.displayName = 'ComponentIdentifier'
return ComponentIdentifier;

@@ -103,0 +104,0 @@ }(_react.Component), _class.propTypes = {

@@ -7,2 +7,9 @@ 'use strict';

exports.default = getDisplayName;
var _warning = require('../warning');
var _warning2 = _interopRequireDefault(_warning);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**

@@ -14,7 +21,11 @@ * ---

*
* For [themeable](#themeable) components defined as ES6 classes, the displayName can
* be added via [babel plugin](#babel-plugin-transform-class-display-name).
*
* @param {ReactComponent|String} Component
* @returns {String} the component display name
* @returns {String} the component displayName
*/
function getDisplayName(Component) {
return typeof Component === 'string' ? Component : Component.name;
(0, _warning2.default)(typeof Component === 'string' || typeof Component.displayName !== 'undefined', '%s is missing the property "displayName".', Component.name);
return typeof Component === 'string' ? Component : Component.displayName;
}

11

package.json
{
"name": "@instructure/ui-utils",
"version": "4.1.0-dev.1",
"version": "4.1.0",
"description": "A collection of utilities for UI components",
"author": "Instructure, Inc. Engineering and Product Design",
"main": "./lib/index.js",
"module": "./es/index.js",
"repository": {

@@ -22,5 +21,3 @@ "type": "git",

"clean": "rimraf lib .babel-cache",
"build": "npm-run-all build:cjs build:es",
"build:cjs": "cross-env NODE_ENV=production babel src --out-dir lib --ignore *.test.js",
"build:es": "cross-env NODE_ENV=production ES_MODULES=1 babel src --out-dir es --ignore *.test.js",
"build": "cross-env NODE_ENV=production babel src --out-dir lib --ignore *.test.js",
"build:dev": "cross-env NODE_ENV=development babel src --out-dir lib --ignore *.test.js"

@@ -30,3 +27,3 @@ },

"devDependencies": {
"@instructure/ui-presets": "^4.1.0-dev.1",
"@instructure/ui-presets": "^4.1.0",
"babel-cli": "6.26.0",

@@ -45,3 +42,3 @@ "react": "15.6.1",

"numeral": "^2.0.6",
"object.omit": "^3.0.0",
"object.omit": "^2.0.1",
"object.pick": "^1.2.0",

@@ -48,0 +45,0 @@ "prop-types": "^15.5.10",

@@ -7,6 +7,6 @@ ---

[npm]: https://img.shields.io/npm/v/@instructure/ui-utils.svg
[npm-url]: https://npmjs.com/package/@instructure/ui-utils
[![npm][npm]][npm-url]
[![build-status][build-status]][build-status-url]
[![MIT License][license-badge]][LICENSE]
[![Code of Conduct][coc-badge]][coc]

@@ -18,14 +18,1 @@ ### Installation

```
[npm]: https://img.shields.io/npm/v/@instructure/ui-utils.svg
[npm-url]: https://npmjs.com/package/@instructure/ui-utils
[build-status]: https://travis-ci.org/instructure/instructure-ui.svg?branch=master
[build-status-url]: https://travis-ci.org/instructure/instructure-ui "Travis CI"
[license-badge]: https://img.shields.io/npm/l/instructure-ui.svg?style=flat-square
[license]: https://github.com/instructure/instructure-ui/blob/master/LICENSE
[coc-badge]: https://img.shields.io/badge/code%20of-conduct-ff69b4.svg?style=flat-square
[coc]: https://github.com/instructure/instructure-ui/blob/master/CODE_OF_CONDUCT.md

@@ -0,1 +1,3 @@

import warning from '../warning'
/**

@@ -7,7 +9,15 @@ * ---

*
* For [themeable](#themeable) components defined as ES6 classes, the displayName can
* be added via [babel plugin](#babel-plugin-transform-class-display-name).
*
* @param {ReactComponent|String} Component
* @returns {String} the component display name
* @returns {String} the component displayName
*/
export default function getDisplayName (Component) {
return typeof Component === 'string' ? Component : Component.name
warning(
typeof Component === 'string' || typeof Component.displayName !== 'undefined',
'%s is missing the property "displayName".',
Component.name
)
return typeof Component === 'string' ? Component : Component.displayName
}
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