Socket
Socket
Sign inDemoInstall

windups

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

windups - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

4

package.json
{
"name": "windups",
"description": "A typewriter effect library for React.",
"version": "1.0.1",
"version": "1.0.2",
"license": "MIT",

@@ -21,3 +21,3 @@ "files": [

"dependencies": {
"break-styled-lines": "^1.1.1"
"break-styled-lines": "1.1.2"
},

@@ -24,0 +24,0 @@ "peerDependencies": {

@@ -17,1 +17,26 @@ # windups

Examples, API docs, and guides can all be found at [the docs site](https://windups.gwil.co)!
## 🗼 Code landmarks
Where the action is happening in this codebase.
### `src/Windup.ts`
The bulk of the file are functions which return modified versions of a windup (e.g. `next`, `rewind`), utilities (e.g. `isUnplayed`), or functions for creating a Windup data structure (e.g. `windupFromString`).
The windup data structure is also described here:
- It has three elements, representing collections of members in three states: played, in progress, and unplayed.
- It is a recursive data structure, i.e. a windup can be a member of any of these three parts.
### `src/react/useWindup.ts`
This is a hook that is used internally by `WindupChildren` and `useWindupString`. It does the bulk of the work of a windup: scheduling the next update, triggering effects, returning callbacks for rewinding/skipping etc.
### `src/react/useWindupString.ts`
This hook does very little: it just turns a string into a windup and passes it along to `useWindup`.
### `src/react/WindupChildren.tsx`
A lot going on in this one: transforming the `children` data type into a Windup, and a rough heuristic to determine when the value of `children` has 'changed' (big quotation marks).
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