From 582aa501083ab3f172770231933b073e8c3aa677 Mon Sep 17 00:00:00 2001 From: vvo Date: Thu, 14 Jan 2016 13:31:20 +0100 Subject: [PATCH] 2.2.0 --- CHANGELOG.md | 7 +++++++ README.md | 10 ++++++++++ npm-shrinkwrap.json | 2 +- package.json | 2 +- 4 files changed, 19 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e037d0a54..0ef07a67b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ + +# [2.2.0](https://github.com/algolia/react-element-to-jsx-string/compare/v2.1.5...v2.2.0) (2016-01-14) + +* add reactElementToJSXString(ReactElement, opts) opts.displayName option to + allow choosing the display name of components + + ## [2.1.5](https://github.com/algolia/react-element-to-jsx-string/compare/v2.1.4...v2.1.5) (2016-01-05) diff --git a/README.md b/README.md index 76f3dd0d8..cdd9cfa76 100644 --- a/README.md +++ b/README.md @@ -57,6 +57,16 @@ console.log(reactElementToJSXString(
Hello, world!
)); // ``` +## API + +### reactElementToJSXString(ReactElement[, options]) + +**options.displayName: function(ReactElement)** + + Provide a different algorithm in charge of finding the right display name (name of the underlying Class) for your element. + + Just return the name you want for the provided ReactElement, as a string. + ## Test ```sh diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 0b5008f67..4db0db5f8 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -1,6 +1,6 @@ { "name": "react-element-to-jsx-string", - "version": "2.1.5", + "version": "2.2.0", "npm-shrinkwrap-version": "200.4.0", "node-version": "v4.2.2", "dependencies": { diff --git a/package.json b/package.json index 7514878bb..d2af86ab5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-element-to-jsx-string", - "version": "2.1.5", + "version": "2.2.0", "description": "Turn a ReactElement into the corresponding JSX string.", "main": "index-dist.js", "scripts": {