react-lorem-component
Advanced tools
Comparing version 0.6.2 to 0.6.3
@@ -17,6 +17,4 @@ /** @jsx React.DOM */ | ||
<body> | ||
<div> | ||
<h1>Lorem Ipsum</h1> | ||
<Lorem count="10" seed="42" className="ipsum" /> | ||
</div> | ||
<h1>Lorem Ipsum</h1> | ||
<Lorem count="10" seed="42" className="ipsum" /> | ||
</body> | ||
@@ -28,3 +26,3 @@ </html> | ||
if (typeof window !== "undefined") { | ||
if (typeof window !== 'undefined') { | ||
window.onload = function() { | ||
@@ -31,0 +29,0 @@ React.renderComponent(<App />, document); |
28
index.js
@@ -1,14 +0,14 @@ | ||
"use strict"; | ||
'use strict'; | ||
var React = require("react"); | ||
var merge = require("react/lib/merge"); | ||
var loremIpsum = require("lorem-ipsum"); | ||
var random = require("seedable-random"); | ||
var React = require('react'); | ||
var merge = require('react/lib/merge'); | ||
var loremIpsum = require('lorem-ipsum'); | ||
var random = require('seedable-random'); | ||
var Lorem = React.createClass({ | ||
displayName: "Lorem", | ||
displayName: 'Lorem', | ||
getDefaultProps: function() { | ||
return { | ||
mode: "paragraphs", count: 5, | ||
return { | ||
mode: 'paragraphs', count: 5, | ||
seed: 0, ordered: false | ||
@@ -19,6 +19,6 @@ }; | ||
render: function() { | ||
var options = merge(this.props, { | ||
units: "paragraphs", | ||
format: "html", | ||
random: random | ||
var options = merge(this.props, { | ||
units: 'paragraphs', | ||
format: 'html', | ||
random: random | ||
}); | ||
@@ -31,4 +31,4 @@ | ||
if (this.props.mode === "list") { | ||
html = html.replace(/<p>(.*?)<\/p>/g, "<li>$1</li>"); | ||
if (this.props.mode === 'list') { | ||
html = html.replace(/<p>(.*?)<\/p>/g, '<li>$1</li>'); | ||
@@ -35,0 +35,0 @@ if (this.props.ordered) { |
{ | ||
"name": "react-lorem-component", | ||
"version": "0.6.2", | ||
"version": "0.6.3", | ||
"description": "A component for React that renders paragraph or list item tags full of lorem ipsum placeholder text", | ||
@@ -8,3 +8,3 @@ "main": "index.js", | ||
"type": "git", | ||
"url": "git://github.com/martinandert/react-lorem-component" | ||
"url": "https://github.com/martinandert/react-lorem-component.git" | ||
}, | ||
@@ -11,0 +11,0 @@ "keywords": [ |
@@ -14,3 +14,3 @@ var assert = require('assert'); | ||
it('transfers props', function() { | ||
var markup = render(LoremIpsum({ className: "lorem-ipsum" })); | ||
var markup = render(LoremIpsum({ className: 'lorem-ipsum' })); | ||
@@ -17,0 +17,0 @@ assert.matches(markup, /^<div [^>]*?class="lorem-ipsum"/); |
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
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
9886
123