atomic-fns 0.2.0 → 0.2.2

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/.esdoc.json CHANGED
@@ -3,7 +3,25 @@
3
3
  "destination": "./docs",
4
4
  "plugins": [
5
5
  {
6
- "name": "esdoc-standard-plugin"
6
+ "name": "esdoc-standard-plugin",
7
+ "option": {
8
+ "test": {
9
+ "source": "./tests/",
10
+ "interfaces": [
11
+ "describe",
12
+ "it",
13
+ "context",
14
+ "suite",
15
+ "test"
16
+ ],
17
+ "includes": [
18
+ "(spec|Spec|test|Test)\\.ts$"
19
+ ],
20
+ "excludes": [
21
+ "\\.config\\.js$"
22
+ ]
23
+ }
24
+ }
7
25
  }
8
26
  ]
9
27
  }
package/.eslintrc.json CHANGED
@@ -26,6 +26,7 @@
26
26
  "@typescript-eslint/explicit-function-return-type": "off",
27
27
  "@typescript-eslint/no-dynamic-delete": "off",
28
28
  "@typescript-eslint/no-unused-vars": "off",
29
+ "@typescript-eslint/prefer-nullish-coalescing": "off",
29
30
  "@typescript-eslint/restrict-plus-operands": "off",
30
31
  "@typescript-eslint/space-before-function-paren": "off",
31
32
  "@typescript-eslint/strict-boolean-expressions": "off",
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Like Lodash, but for ESNext and with types.
4
4
 
5
- Stop shipping code built for browsers from 2015. Really though, look at the [issues](https://github.com/lodash/lodash/issues/2930#issuecomment-370295020).
5
+ Stop shipping code built for browsers from 2015. Really though, look at the [issues](https://github.com/lodash/lodash/issues/2930).
6
6
 
7
7
  * **Modular**: Pick what you need. Works with all bundlers and also supports tree-shaking.
8
8
  * **ESNext**: Uses modern idiomatic syntax, data structures, and control flow techniques.
@@ -20,7 +20,7 @@ npm install atomic-fns
20
20
 
21
21
  ## How to use
22
22
  ```typescript
23
- import { id, reversed, sorted, times, uniqueId } from 'atomic-fns'
23
+ import { reversed, sorted, times, uniqueId } from 'atomic-fns'
24
24
 
25
25
  reverse([1, 2, 3, 4])
26
26
  // -> [4, 3, 2, 1]
@@ -28,10 +28,7 @@ reverse([1, 2, 3, 4])
28
28
  sorted([4, 3, 2, 1])
29
29
  // -> [1, 2, 3, 4]
30
30
 
31
- times(5, id)
32
- // -> [0, 1, 2, 3, 4]
33
-
34
- times(5, id)
31
+ times(5, (i) => i)
35
32
  // -> [0, 1, 2, 3, 4]
36
33
 
37
34
  uniqueId('user_')
package/package.json CHANGED
@@ -1,7 +1,7 @@
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.0",
4
+ "version": "0.2.2",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
7
7
  "devDependencies": {
@@ -23,23 +23,24 @@
23
23
  "prettier": "^2.7.1",
24
24
  "pretty-quick": "^3.1.3",
25
25
  "ts-node": "^10.4.1",
26
+ "typedoc": "^0.23.16",
26
27
  "typescript": "^4.8.4"
27
28
  },
28
29
  "scripts": {
29
- "prepublishOnly": "npm test && npm run tsc",
30
+ "prepublishOnly": "npm test",
30
31
  "test": "NODE_OPTIONS=--loader=ts-node/esm jasmine --config=jasmine.json",
31
32
  "tsc": "tsc -p ./tsconfig.xo.json --declaration",
32
33
  "lint": "eslint src/**",
33
34
  "lint:fix": "eslint src/** --fix",
34
- "format": "prettier --write src/**",
35
- "docs": "npm run tsc && esdoc"
35
+ "build": "npm run tsc && npm run lint:fix",
36
+ "docs": "typedoc --mode modules"
36
37
  },
37
38
  "lint-staged": {
38
39
  "*.ts": "eslint"
39
40
  },
40
41
  "husky": {
41
42
  "hooks": {
42
- "precommit": "npm test && lint-staged && pretty-quick --staged"
43
+ "precommit": "lint-staged && pretty-quick --staged"
43
44
  }
44
45
  },
45
46
  "repository": {
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Collections
3
+ * @module
4
+ */
1
5
  import { Function, Iteratee } from './globals.js';
2
6
  /**
3
7
  * A container type that provides contains().