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

react-typing-animation

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-typing-animation - npm Package Compare versions

Comparing version 1.3.2 to 1.3.3

6

dist/Typing.js

@@ -25,4 +25,2 @@ 'use strict';

var _lodash = require('lodash');
var _utils = require('./utils');

@@ -195,3 +193,3 @@

while ((0, _lodash.has)(toType, '0.type.updateCursor') && cursor.numToErase < 1) {
while (toType && toType[0] && toType[0].type && toType[0].type.updateCursor && cursor.numToErase < 1) {
cursor = toType[0].type.updateCursor(cursor, toType[0].props);

@@ -416,3 +414,3 @@ toType.shift();

if (children && !(0, _lodash.isEqual)(children, this.props.children)) {
if (children !== undefined && JSON.stringify(children) !== JSON.stringify(this.props.children)) {
this.resetState();

@@ -419,0 +417,0 @@ }

{
"name": "react-typing-animation",
"version": "1.3.2",
"version": "1.3.3",
"author": "Adam King https://github.com/adamjking3",

@@ -34,3 +34,2 @@ "homepage": "https://adamjking3.github.io/react-typing-animation-example/",

"babel-preset-env": "^1.6.1",
"babel-preset-react": "^6.24.1",
"babel-preset-react-app": "^3.1.1",

@@ -37,0 +36,0 @@ "copy-webpack-plugin": "^4.5.1",

@@ -44,2 +44,4 @@ # React-typing-animation

**Feature requests and pull requests welcome**
## Installation

@@ -65,11 +67,11 @@

| Property | Type | Default | Required | Description |
| :--------------: | :--------: | :-----------------------------------------------------------------------------------------: | :------: | :---------: |
| children | React node | | yes | |
| className | string | '' | no | |
| cursor | React node | [Cursor.js](https://github.com/adamjking3/react-typing-animation/blob/master/src/Cursor.js) | no | |
| speed | number | 50 | no | |
| startDelay | number | 0 | no | |
| loop | boolean | false | no | |
| onFinishedTyping | function | () => {} | no | |
| Property | Type | Default | Required |
| :--------------: | :--------: | :--------------------------------------------------------------------------------------------: | :------: |
| children | React node | | yes |
| className | string | | no |
| cursor | React node | [`<Cursor />`](https://github.com/adamjking3/react-typing-animation/blob/master/src/Cursor.js) | no |
| speed | number | 50 (ms) | no |
| startDelay | number | 0 (ms) | no |
| loop | boolean | false | no |
| onFinishedTyping | function | () => {} | no |

@@ -150,12 +152,9 @@ ### Backspace Component

```shell
# Starts a webpack dev server that hosts a demo page with the component.
# It uses react-hot-loader so changes are reflected on save.
# Starts a webpack dev server that hosts the demo at http://localhost:3000
npm start
# Lints the code with eslint and my custom rules.
# Lints the code with eslint
npm run lint
# Lints and builds the code, placing the result in the dist directory.
# This build is necessary to reflect changes if you're
# `npm link`-ed to this repository from another local project.
npm run build

@@ -162,0 +161,0 @@ ```

import React, { Component } from 'react';
import PropTypes from 'prop-types';
import requestAnimationFrame from 'raf';
import { has, isEqual } from 'lodash';

@@ -20,3 +19,6 @@ import { randomize, extractText, replaceTreeText } from './utils';

componentWillReceiveProps({ children }) {
if (children && !isEqual(children, this.props.children)) {
if (
children !== undefined &&
JSON.stringify(children) !== JSON.stringify(this.props.children)
) {
this.resetState();

@@ -82,3 +84,9 @@ }

while (has(toType, '0.type.updateCursor') && cursor.numToErase < 1) {
while (
toType &&
toType[0] &&
toType[0].type &&
toType[0].type.updateCursor &&
cursor.numToErase < 1
) {
cursor = toType[0].type.updateCursor(cursor, toType[0].props);

@@ -85,0 +93,0 @@ toType.shift();

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