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.
Files changed (70) hide show
  1. package/.firebaserc +5 -0
  2. package/README.md +9 -4
  3. package/firebase.json +10 -0
  4. package/package.json +9 -9
  5. package/src/collections/index.d.ts +672 -0
  6. package/src/collections/index.js +1091 -0
  7. package/src/collections/index.ts +1186 -0
  8. package/src/datetime/index.d.ts +6 -0
  9. package/src/datetime/index.js +6 -0
  10. package/src/datetime/index.ts +7 -0
  11. package/src/functools/index.d.ts +107 -0
  12. package/src/functools/index.js +219 -0
  13. package/src/functools/index.ts +255 -0
  14. package/src/globals/index.d.ts +286 -0
  15. package/src/globals/index.js +388 -0
  16. package/src/globals/index.ts +451 -0
  17. package/src/index.d.ts +8 -7
  18. package/src/index.js +8 -7
  19. package/src/index.ts +8 -7
  20. package/src/itertools/index.d.ts +225 -0
  21. package/src/itertools/index.js +449 -0
  22. package/src/itertools/index.ts +471 -0
  23. package/src/math/index.d.ts +97 -0
  24. package/src/math/index.js +92 -0
  25. package/src/math/index.ts +152 -0
  26. package/src/{operators.d.ts → operators/index.d.ts} +11 -9
  27. package/src/operators/index.js +171 -0
  28. package/src/operators/index.ts +175 -0
  29. package/src/random/index.d.ts +42 -0
  30. package/src/random/index.js +65 -0
  31. package/src/random/index.ts +66 -0
  32. package/tests/collections.spec.ts +42 -25
  33. package/tests/globals.spec.ts +56 -60
  34. package/tests/itertools.spec.ts +176 -4
  35. package/tests/math.spec.ts +25 -0
  36. package/tests/operators.spec.ts +1 -26
  37. package/tests/random.spec.ts +46 -0
  38. package/tsconfig.json +12 -4
  39. package/src/collections.d.ts +0 -228
  40. package/src/collections.js +0 -553
  41. package/src/collections.ts +0 -641
  42. package/src/datetime.d.ts +0 -5
  43. package/src/datetime.js +0 -5
  44. package/src/datetime.ts +0 -6
  45. package/src/functools.d.ts +0 -40
  46. package/src/functools.js +0 -78
  47. package/src/functools.ts +0 -93
  48. package/src/globals.d.ts +0 -179
  49. package/src/globals.js +0 -309
  50. package/src/globals.ts +0 -377
  51. package/src/itertools.d.ts +0 -20
  52. package/src/itertools.js +0 -98
  53. package/src/itertools.ts +0 -116
  54. package/src/math.d.ts +0 -16
  55. package/src/math.js +0 -70
  56. package/src/math.ts +0 -77
  57. package/src/objects.d.ts +0 -0
  58. package/src/objects.js +0 -1
  59. package/src/objects.ts +0 -0
  60. package/src/operators.js +0 -109
  61. package/src/operators.ts +0 -130
  62. package/src/random.d.ts +0 -22
  63. package/src/random.js +0 -48
  64. package/src/random.ts +0 -53
  65. package/src/strings.d.ts +0 -0
  66. package/src/strings.js +0 -1
  67. package/src/strings.ts +0 -0
  68. package/src/util.d.ts +0 -0
  69. package/src/util.js +0 -1
  70. package/src/util.ts +0 -0
package/.firebaserc ADDED
@@ -0,0 +1,5 @@
1
+ {
2
+ "projects": {
3
+ "default": "atomic-fns"
4
+ }
5
+ }
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
- * **Fluent**: Pure functions and abstract classes. Include only what you need.
11
- * **TypeScript & docs**: Includes both type declaration files and js with JSDocs for best in class experience.
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
- reverse([1, 2, 3, 4])
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
- 🚢 Coming soon at [atomic-fns.dev](https://atomic-fns.dev).
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
@@ -0,0 +1,10 @@
1
+ {
2
+ "hosting": {
3
+ "public": "docs",
4
+ "ignore": [
5
+ "firebase.json",
6
+ "**/.*",
7
+ "**/node_modules/**"
8
+ ]
9
+ }
10
+ }
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.2.2",
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 lint:fix",
36
- "docs": "typedoc --mode modules"
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
- "es2016",
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",