react-is
Advanced tools
Comparing version 1.0.0 to 16.3.0-alpha.1
36
index.js
@@ -1,37 +0,7 @@ | ||
/** | ||
* Copyright (c) 2014-present, Facebook, Inc. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
'use strict'; | ||
var REACT_ELEMENT_TYPE; | ||
var REACT_COROUTINE_TYPE; | ||
var REACT_YIELD_TYPE; | ||
if (typeof Symbol === 'function' && Symbol.for) { | ||
REACT_ELEMENT_TYPE = Symbol.for('react.element); | ||
REACT_COROUTINE_TYPE = Symbol.for('react.coroutine'); | ||
REACT_YIELD_TYPE = Symbol.for('react.yield'); | ||
if (process.env.NODE_ENV === 'production') { | ||
module.exports = require('./cjs/react-is.production.min.js'); | ||
} else { | ||
REACT_ELEMENT_TYPE = 0xeac7; | ||
REACT_COROUTINE_TYPE = 0xeac8; | ||
REACT_YIELD_TYPE = 0xeac9; | ||
module.exports = require('./cjs/react-is.development.js'); | ||
} | ||
function is(object, type) { | ||
return object !== null && typeof object === 'object' && object.$$typeof === type; | ||
} | ||
module.exports = { | ||
isElement(object) { | ||
return is(object, REACT_ELEMENT_TYPE); | ||
}, | ||
isCoroutine(object) { | ||
return is(object, REACT_COROUTINE_TYPE); | ||
}, | ||
isYield(object) { | ||
return is(object, REACT_YIELD_TYPE); | ||
}, | ||
}; |
{ | ||
"name": "react-is", | ||
"version": "16.3.0-alpha.1", | ||
"description": "Brand checking of React Elements.", | ||
"main": "index.js", | ||
"repository": "facebook/react", | ||
"keywords": [ | ||
"react" | ||
], | ||
"version": "1.0.0", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/facebook/react/issues" | ||
}, | ||
"homepage": "https://reactjs.org/", | ||
"bugs": "https://github.com/facebook/react/issues", | ||
"license": "MIT", | ||
"peerDependencies": { | ||
"react": "^16.0.0 || 16.3.0-alpha.1" | ||
}, | ||
"files": [ | ||
"index.js" | ||
], | ||
"main": "index.js", | ||
"repository": "facebook/react", | ||
"engines": { | ||
"node": ">=0.10.0" | ||
} | ||
"LICENSE", | ||
"README.md", | ||
"index.js", | ||
"cjs/", | ||
"umd/" | ||
] | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
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 bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
13361
8
224
1
0
84
1
1
2
2