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

@dhis2/prop-types

Package Overview
Dependencies
Maintainers
14
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dhis2/prop-types - npm Package Compare versions

Comparing version 1.3.0 to 1.4.0

6

build/cjs/index.js

@@ -24,2 +24,8 @@ "use strict";

});
Object.defineProperty(exports, "requiredIf", {
enumerable: true,
get: function get() {
return _requiredIf.requiredIf;
}
});
exports.default = void 0;

@@ -26,0 +32,0 @@

@@ -63,2 +63,7 @@ "use strict";

* }
*
* // Enforce presence of a multiple children, all Button instances
* ButtonWrap.propTypes = {
* children: proptypes.arrayOf(instanceOfComponent(Button)).isRequired
* }
*/

@@ -65,0 +70,0 @@

2

build/cjs/requiredIf.js

@@ -56,3 +56,3 @@ "use strict";

* import React from 'react'
* import { propTypes } from '@dhis2/prop-types'
* import { requiredIf } from '@dhis2/prop-types'
*

@@ -59,0 +59,0 @@ * const Test = ({ someBool, someString }) => (

@@ -10,3 +10,3 @@ import propTypes from 'prop-types';

propTypes.requiredIf = requiredIf;
export { arrayWithLength, instanceOfComponent, mutuallyExclusive };
export { arrayWithLength, instanceOfComponent, mutuallyExclusive, requiredIf };
export default propTypes;

@@ -54,2 +54,7 @@ const instanceOfComponentFactory = (Component, isRequired) => (props, propSelector, // normally a propName, but when wrapped in arrayOf an index

* }
*
* // Enforce presence of a multiple children, all Button instances
* ButtonWrap.propTypes = {
* children: proptypes.arrayOf(instanceOfComponent(Button)).isRequired
* }
*/

@@ -56,0 +61,0 @@

@@ -42,3 +42,3 @@ import propTypes from 'prop-types';

* import React from 'react'
* import { propTypes } from '@dhis2/prop-types'
* import { requiredIf } from '@dhis2/prop-types'
*

@@ -45,0 +45,0 @@ * const Test = ({ someBool, someString }) => (

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

# [1.4.0](https://github.com/dhis2/prop-types/compare/v1.3.0...v1.4.0) (2019-11-21)
### Features
* **index js:** add requiredIf to named exports ([#75](https://github.com/dhis2/prop-types/issues/75)) ([cf6697e](https://github.com/dhis2/prop-types/commit/cf6697e6a213b76c8c047355149681339c2d92a5))
# [1.3.0](https://github.com/dhis2/prop-types/compare/v1.2.2...v1.3.0) (2019-11-07)

@@ -2,0 +9,0 @@

{
"name": "@dhis2/prop-types",
"version": "1.3.0",
"version": "1.4.0",
"main": "./build/cjs/index.js",

@@ -26,5 +26,5 @@ "module": "./build/es/index.js",

"devDependencies": {
"@babel/cli": "^7.6.4",
"@babel/core": "^7.6.4",
"@babel/preset-env": "^7.6.3",
"@babel/cli": "^7.7.0",
"@babel/core": "^7.7.2",
"@babel/preset-env": "^7.7.1",
"@dhis2/cli-style": "4.2.0",

@@ -31,0 +31,0 @@ "babel-eslint": "^10.0.3",

@@ -89,2 +89,7 @@ # DHIS2 propTypes

}
// Enforce presence of a multiple children, all Button instances
ButtonWrap.propTypes = {
children: proptypes.arrayOf(instanceOfComponent(Button)).isRequired
}
```

@@ -143,3 +148,3 @@ <a name="mutuallyExclusive"></a>

import React from 'react'
import { propTypes } from '@dhis2/prop-types'
import { requiredIf } from '@dhis2/prop-types'

@@ -146,0 +151,0 @@ const Test = ({ someBool, someString }) => (

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