Skip to content

Commit 7d327dd

Browse files
committed
[fork]
1 parent 2c2a2b7 commit 7d327dd

12 files changed

+38
-38
lines changed

README.md

+20-20
Original file line numberDiff line numberDiff line change
@@ -4,40 +4,40 @@
44
src="https://document-export.canva.com/DADLRIBWTFM/45/preview/0001-645846858.png"
55
height="350"
66
width="350"
7-
alt="@libre/atom logo" />
7+
alt="@steem-monsters/atom logo" />
88
</p>
99
</div>
1010

1111
<h3 align="center">A way to manage shared, synchronous, independent state</h3>
1212

1313
<h3 align="center">Inspired by <a href="https://clojure.org/reference/atoms">atom</a>s in <a href="https://clojure.org/index">Clojure(Script)</a></h3>
1414

15+
<h3 align="center">Forked from <a href="https://github.com/libre-org/atom">@libre/atom</a></h3>
16+
1517
<div style="heigth:40px;">&nbsp;</div>
1618

1719
[![TypeScript](https://badges.frapsoft.com/typescript/version/typescript-next.svg?v=101)](https://github.com/ellerbrock/typescript-badges/)
18-
[![npm (scoped)](https://img.shields.io/npm/v/@libre/atom.svg)](https://www.npmjs.com/package/@libre/atom)
19-
[![npm bundle size (minified)](https://img.shields.io/bundlephobia/min/@libre/atom.svg)](https://bundlephobia.com/result?p=@libre/atom)
20-
[![npm bundle size (minified + gzip)](https://img.shields.io/bundlephobia/minzip/@libre/atom.svg)](https://bundlephobia.com/result?p=@libre/atom)
20+
[![npm (scoped)](https://img.shields.io/npm/v/@steem-monsters/atom.svg)](https://www.npmjs.com/package/@steem-monsters/atom)
21+
[![npm bundle size (minified)](https://img.shields.io/bundlephobia/min/@steem-monsters/atom.svg)](https://bundlephobia.com/result?p=@steem-monsters/atom)
22+
[![npm bundle size (minified + gzip)](https://img.shields.io/bundlephobia/minzip/@steem-monsters/atom.svg)](https://bundlephobia.com/result?p=@steem-monsters/atom)
2123

22-
[![Build Status](https://travis-ci.com/libre-org/atom.svg?branch=master)](https://travis-ci.com/libre-org/atom)
23-
[![codecov](https://codecov.io/gh/libre-org/atom/branch/master/graph/badge.svg)](https://codecov.io/gh/libre-org/atom)
24-
[![npm](https://img.shields.io/npm/dt/@libre/atom.svg)](https://www.npmjs.com/package/@libre/atom)
24+
[![npm](https://img.shields.io/npm/dt/@steem-monsters/atom.svg)](https://www.npmjs.com/package/@steem-monsters/atom)
2525

26-
[![NpmLicense](https://img.shields.io/npm/l/@libre/atom.svg)](https://www.npmjs.com/package/@libre/atom)
26+
[![NpmLicense](https://img.shields.io/npm/l/@steem-monsters/atom.svg)](https://www.npmjs.com/package/@steem-monsters/atom)
2727
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
2828
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
2929

3030
## Description
3131

32-
`@libre/atom` provides a data type called `Atom`s and a few functions for working with `Atom`s. It is heavily inspired by `atom`s in Clojure(Script). While the full power of Clojure `atom`s cannot be experienced in JavaScript's single-threaded runtime, `Atom`s do still offer similar benefits due to the highly asynchronous and event-driven nature of JavaScript.
32+
`@steem-monsters/atom` provides a data type called `Atom`s and a few functions for working with `Atom`s. It is heavily inspired by `atom`s in Clojure(Script). While the full power of Clojure `atom`s cannot be experienced in JavaScript's single-threaded runtime, `Atom`s do still offer similar benefits due to the highly asynchronous and event-driven nature of JavaScript.
3333

3434
Atoms provide a predictable way to manage state shared by multiple components of a
3535
program as that state changes over time. They are particularly useful in the functional and reactive programming paradigms, where most components of a program are pure functions operating on immutable data. `Atoms` provide a controlled mechanism for mutability that lets multiple components access and update the same value without risking mutating another component's reference to it in the middle of some process or asynchronous operation.
3636

3737
### Put your state in an `Atom`:
3838

3939
```ts
40-
import { Atom } from "@libre/atom";
40+
import { Atom } from "@steem-monsters/atom";
4141

4242
const appState = Atom.of({
4343
color: "blue",
@@ -50,7 +50,7 @@ const appState = Atom.of({
5050
You can't inspect `Atom` state directly, you have to `deref`erence it, like this:
5151

5252
```js
53-
import { deref } from "@libre/atom";
53+
import { deref } from "@steem-monsters/atom";
5454

5555
const { color } = deref(appState);
5656
```
@@ -74,7 +74,7 @@ function swap<S>(
7474
To illustrate, here is how we might update `appState`'s color:
7575

7676
```js
77-
import { swap } from "@libre/atom";
77+
import { swap } from "@steem-monsters/atom";
7878

7979
const setColor = color =>
8080
swap(appState, state => ({
@@ -87,37 +87,37 @@ const setColor = color =>
8787
8888
## Installation
8989

90-
**NPM**: `npm install --save @libre/atom`
90+
**NPM**: `npm install --save @steem-monsters/atom`
9191

92-
**Yarn**: `yarn add @libre/atom`
92+
**Yarn**: `yarn add @steem-monsters/atom`
9393

94-
**CDN**: `<script src="https://unpkg.com/@libre/atom" />`
94+
**CDN**: `<script src="https://unpkg.com/@steem-monsters/atom" />`
9595

96-
- Exposed on the global object, like so: `window["@libre/atom"]`
96+
- Exposed on the global object, like so: `window["@steem-monsters/atom"]`
9797

9898
## Usage
9999

100100
**ES6 `import`**
101101

102102
```js
103-
import { Atom, deref, set, swap } from "@libre/atom";
103+
import { Atom, deref, set, swap } from "@steem-monsters/atom";
104104
```
105105

106106
**CommonJS `require`**
107107

108108
```js
109-
const { Atom, deref, set, swap } = require("@libre/atom");
109+
const { Atom, deref, set, swap } = require("@steem-monsters/atom");
110110
```
111111

112112
**Web `<script />` tag**
113113

114114
```js
115-
const { Atom, deref, set, swap } = window["@libre/atom"];
115+
const { Atom, deref, set, swap } = window["@steem-monsters/atom"];
116116
```
117117

118118
## Documentation
119119

120-
[You can find API docs for `@libre/atom` here](https://libre-org.github.io/atom/)
120+
[You can find API docs for `@steem-monsters/atom` here](https://libre-org.github.io/atom/)
121121

122122
## Contributing / Feedback
123123

package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"author": {
3-
"name": "Derrick Beining",
4-
"url": "https://github.com/libre-org"
3+
"name": "Jelle Licht",
4+
"url": "https://github.com/steem-monsters/atom"
55
},
66
"bugs": {
7-
"url": "https://github.com/libre-org/atom/issues"
7+
"url": "https://github.com/steem-monsters/atom/issues"
88
},
99
"config": {
1010
"commitizen": {
@@ -49,7 +49,7 @@
4949
"package.json",
5050
"LICENSE"
5151
],
52-
"homepage": "https://libre-org.github.io/atom/",
52+
"homepage": "https://github.com/steem-monsters/atom",
5353
"husky": {
5454
"hooks": {
5555
"pre-commit": "./scripts/precommit.sh",
@@ -68,10 +68,10 @@
6868
"license": "MIT",
6969
"main": "dist/index.umd.js",
7070
"module": "dist/index.esm.js",
71-
"name": "@libre/atom",
71+
"name": "@steem-monsters/atom",
7272
"repository": {
7373
"type": "git",
74-
"url": "https://github.com/libre-org/atom.git"
74+
"url": "https://github.com/steem-monsters/atom.git"
7575
},
7676
"scripts": {
7777
"build": "rollup -c rollup.config.ts",
@@ -89,6 +89,6 @@
8989
},
9090
"sideEffects": false,
9191
"types": "dist/types/index.d.ts",
92-
"unpkg": "https://unpkg.com/@libre/atom",
92+
"unpkg": "https://unpkg.com/@steem-monsters/atom",
9393
"version": "0.0.0-development"
9494
}

rollup.config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export default [
4242
output: {
4343
file: pkg.main,
4444
format: "umd",
45-
name: "@libre/atom",
45+
name: "@steem-monsters/atom",
4646
sourcemap: true
4747
},
4848
plugins: [...defaultConfig.plugins, tsUMD, uglify()]

src/atom.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export class Atom<S = any> {
1919
* @example
2020
```js
2121
22-
import { Atom } from '@libre/atom'
22+
import { Atom } from '@steem-monsters/atom'
2323
2424
const a1 = Atom.of(0)
2525
const a2 = Atom.of("zero")

src/changeHandler.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { _addChangeHandler, _removeChangeHandler } from "./internal-state";
99
* @example
1010
```js
1111
12-
import {Atom, addChangeHandler, swap} from '@libre/atom'
12+
import {Atom, addChangeHandler, swap} from '@steem-monsters/atom'
1313
1414
const countAtom = Atom.of({ count: 0 })
1515
@@ -41,7 +41,7 @@ export function addChangeHandler<S>(
4141
* @example
4242
```js
4343
44-
import {Atom, addChangeHandler, removeChangeHandler, swap} from '@libre/atom'
44+
import {Atom, addChangeHandler, removeChangeHandler, swap} from '@steem-monsters/atom'
4545
4646
const countAtom = Atom.of({ count: 0 })
4747

src/deref.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { throwIfNotAtom } from "./throwIfNotAtom";
1212
* @example
1313
```js
1414
15-
import {Atom, deref} from '@libre/atom'
15+
import {Atom, deref} from '@steem-monsters/atom'
1616
1717
const stateAtom = Atom.of({ count: 0 })
1818

src/getValidator.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { throwIfNotAtom } from "./throwIfNotAtom";
1212
* @example
1313
```js
1414
15-
import {Atom, deref, getValidator, swap} from '@libre/atom'
15+
import {Atom, deref, getValidator, swap} from '@steem-monsters/atom'
1616
1717
const atom = Atom.of({ count: 0 }, { validator: (state) => isEven(state.count) })
1818
const validator = getValidator(atom)

src/set.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import { throwIfNotAtom } from "./throwIfNotAtom";
1717
* @example
1818
```js
1919
20-
import {Atom, deref, set} from '@libre/atom'
20+
import {Atom, deref, set} from '@steem-monsters/atom'
2121
2222
const atom = Atom.of({ count: 0 })
2323

src/setValidator.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { throwIfNotAtom } from "./throwIfNotAtom";
1515
* @example
1616
```js
1717
18-
import {Atom, deref, setValidator, set} from '@libre/atom'
18+
import {Atom, deref, setValidator, set} from '@steem-monsters/atom'
1919
import { _setValidator } from './internal-state';
2020
2121
const atom = Atom.of({ count: 0 }, {validator: (state) => isNumber(state.count) })

src/swap.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { throwIfNotAtom } from "./throwIfNotAtom";
1515
* @example
1616
* ```jsx
1717
*
18-
*import {Atom, swap} from '@libre/atom'
18+
*import {Atom, swap} from '@steem-monsters/atom'
1919
import {prettyPrint} from './prettyPrint'
2020
*
2121
*const stateAtom = Atom.of({ count: 0 })

typedoc.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module.exports = {
33
excludePrivate: true,
44
excludeProtected: true,
55
hideGenerator: true,
6-
name: "@libre/atom",
6+
name: "@steem-monsters/atom",
77
out: "./docs",
88
theme: "default"
99
};

0 commit comments

Comments
 (0)