atomic-fns 0.2.2 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.firebaserc +5 -0
- package/README.md +9 -4
- package/firebase.json +10 -0
- package/package.json +9 -9
- package/src/collections/index.d.ts +672 -0
- package/src/collections/index.js +1091 -0
- package/src/collections/index.ts +1186 -0
- package/src/datetime/index.d.ts +6 -0
- package/src/datetime/index.js +6 -0
- package/src/datetime/index.ts +7 -0
- package/src/functools/index.d.ts +107 -0
- package/src/functools/index.js +219 -0
- package/src/functools/index.ts +255 -0
- package/src/globals/index.d.ts +286 -0
- package/src/globals/index.js +388 -0
- package/src/globals/index.ts +451 -0
- package/src/index.d.ts +8 -7
- package/src/index.js +8 -7
- package/src/index.ts +8 -7
- package/src/itertools/index.d.ts +225 -0
- package/src/itertools/index.js +449 -0
- package/src/itertools/index.ts +471 -0
- package/src/math/index.d.ts +97 -0
- package/src/math/index.js +92 -0
- package/src/math/index.ts +152 -0
- package/src/{operators.d.ts → operators/index.d.ts} +11 -9
- package/src/operators/index.js +171 -0
- package/src/operators/index.ts +175 -0
- package/src/random/index.d.ts +42 -0
- package/src/random/index.js +65 -0
- package/src/random/index.ts +66 -0
- package/tests/collections.spec.ts +42 -25
- package/tests/globals.spec.ts +56 -60
- package/tests/itertools.spec.ts +176 -4
- package/tests/math.spec.ts +25 -0
- package/tests/operators.spec.ts +1 -26
- package/tests/random.spec.ts +46 -0
- package/tsconfig.json +12 -4
- package/src/collections.d.ts +0 -228
- package/src/collections.js +0 -553
- package/src/collections.ts +0 -641
- package/src/datetime.d.ts +0 -5
- package/src/datetime.js +0 -5
- package/src/datetime.ts +0 -6
- package/src/functools.d.ts +0 -40
- package/src/functools.js +0 -78
- package/src/functools.ts +0 -93
- package/src/globals.d.ts +0 -179
- package/src/globals.js +0 -309
- package/src/globals.ts +0 -377
- package/src/itertools.d.ts +0 -20
- package/src/itertools.js +0 -98
- package/src/itertools.ts +0 -116
- package/src/math.d.ts +0 -16
- package/src/math.js +0 -70
- package/src/math.ts +0 -77
- package/src/objects.d.ts +0 -0
- package/src/objects.js +0 -1
- package/src/objects.ts +0 -0
- package/src/operators.js +0 -109
- package/src/operators.ts +0 -130
- package/src/random.d.ts +0 -22
- package/src/random.js +0 -48
- package/src/random.ts +0 -53
- package/src/strings.d.ts +0 -0
- package/src/strings.js +0 -1
- package/src/strings.ts +0 -0
- package/src/util.d.ts +0 -0
- package/src/util.js +0 -1
- package/src/util.ts +0 -0
package/.firebaserc
ADDED
package/README.md
CHANGED
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
# atomic-fns
|
|
2
2
|
|
|
3
|
+
[Read the Docs](https://atomic-fns.dev)
|
|
4
|
+
|
|
3
5
|
## Like Lodash, but for ESNext and with types.
|
|
4
6
|
|
|
5
7
|
Stop shipping code built for browsers from 2015. Really though, look at the [issues](https://github.com/lodash/lodash/issues/2930).
|
|
6
8
|
|
|
9
|
+
You may prefer this because it's:
|
|
10
|
+
|
|
7
11
|
* **Modular**: Pick what you need. Works with all bundlers and also supports tree-shaking.
|
|
8
12
|
* **ESNext**: Uses modern idiomatic syntax, data structures, and control flow techniques.
|
|
9
13
|
* **Lazy**: Leverage generators, iterators, and functional composition.
|
|
10
|
-
* **
|
|
11
|
-
* **
|
|
14
|
+
* **Zero deps**: Built from scratch with no dependencies whatsoever.
|
|
15
|
+
* **Well tested**: All modules have comprehensive test suites aiming for 100% coverage.
|
|
16
|
+
* **TypeScript & docs**: Includes type declaration files and js with JSDocs for best in class experience.
|
|
12
17
|
|
|
13
18
|
## Get Started
|
|
14
19
|
|
|
@@ -22,7 +27,7 @@ npm install atomic-fns
|
|
|
22
27
|
```typescript
|
|
23
28
|
import { reversed, sorted, times, uniqueId } from 'atomic-fns'
|
|
24
29
|
|
|
25
|
-
|
|
30
|
+
reversed([1, 2, 3, 4])
|
|
26
31
|
// -> [4, 3, 2, 1]
|
|
27
32
|
|
|
28
33
|
sorted([4, 3, 2, 1])
|
|
@@ -37,7 +42,7 @@ uniqueId('user_')
|
|
|
37
42
|
|
|
38
43
|
## Docs
|
|
39
44
|
|
|
40
|
-
|
|
45
|
+
📖 Available on [atomic-fns.dev](https://atomic-fns.dev)
|
|
41
46
|
|
|
42
47
|
💡 See the `src` directory for comments.
|
|
43
48
|
|
package/firebase.json
ADDED
package/package.json
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "atomic-fns",
|
|
3
3
|
"description": "Like Lodash, but for ESNext and with types. Stop shipping code built for browsers from 2015.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.3.0",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"devDependencies": {
|
|
8
8
|
"@types/jasmine": "^4.3.0",
|
|
9
9
|
"@typescript-eslint/eslint-plugin": "^5.39.0",
|
|
10
|
-
"esdoc": "^1.1.0",
|
|
11
|
-
"esdoc-standard-plugin": "^1.0.0",
|
|
12
10
|
"eslint": "^8.25.0",
|
|
13
11
|
"eslint-config-prettier": "^8.5.0",
|
|
14
12
|
"eslint-config-standard-with-typescript": "^23.0.0",
|
|
@@ -30,13 +28,14 @@
|
|
|
30
28
|
"prepublishOnly": "npm test",
|
|
31
29
|
"test": "NODE_OPTIONS=--loader=ts-node/esm jasmine --config=jasmine.json",
|
|
32
30
|
"tsc": "tsc -p ./tsconfig.xo.json --declaration",
|
|
31
|
+
"tsc:w": "tsc -p ./tsconfig.xo.json --declaration --watch",
|
|
33
32
|
"lint": "eslint src/**",
|
|
34
33
|
"lint:fix": "eslint src/** --fix",
|
|
35
|
-
"build": "npm run tsc && npm run
|
|
36
|
-
"docs": "typedoc
|
|
34
|
+
"build": "npm run lint:fix && npm run tsc && npm run docs",
|
|
35
|
+
"docs": "typedoc"
|
|
37
36
|
},
|
|
38
37
|
"lint-staged": {
|
|
39
|
-
"*.ts": "eslint"
|
|
38
|
+
"*.ts": "eslint --fix"
|
|
40
39
|
},
|
|
41
40
|
"husky": {
|
|
42
41
|
"hooks": {
|
|
@@ -58,15 +57,16 @@
|
|
|
58
57
|
"es6",
|
|
59
58
|
"es7",
|
|
60
59
|
"es8",
|
|
61
|
-
"
|
|
62
|
-
"es2017",
|
|
63
|
-
"es2019",
|
|
60
|
+
"es9",
|
|
64
61
|
"es2020",
|
|
65
62
|
"es2021",
|
|
66
63
|
"es2022",
|
|
67
64
|
"es2023",
|
|
68
65
|
"lodash",
|
|
66
|
+
"lodash-es",
|
|
67
|
+
"itertools",
|
|
69
68
|
"lazy",
|
|
69
|
+
"module",
|
|
70
70
|
"modules",
|
|
71
71
|
"stdlib",
|
|
72
72
|
"core-js",
|