bare-format 1.0.0 → 1.0.1

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 (3) hide show
  1. package/index.d.ts +9 -0
  2. package/index.js +2 -2
  3. package/package.json +11 -5
package/index.d.ts ADDED
@@ -0,0 +1,9 @@
1
+ declare function format(...args: unknown[]): string
2
+
3
+ declare namespace format {
4
+ export function format(...args: unknown[]): string
5
+
6
+ export function formatWithOptions(opts: {}, ...args: unknown[]): string
7
+ }
8
+
9
+ export = format
package/index.js CHANGED
@@ -1,12 +1,12 @@
1
1
  const inspect = require('bare-inspect')
2
2
 
3
- module.exports = exports = function format (...args) {
3
+ module.exports = exports = function format(...args) {
4
4
  return exports.formatWithOptions({}, ...args)
5
5
  }
6
6
 
7
7
  exports.format = exports
8
8
 
9
- exports.formatWithOptions = function formatWithOptions (opts, ...args) {
9
+ exports.formatWithOptions = function formatWithOptions(opts, ...args) {
10
10
  const format = args[0]
11
11
 
12
12
  let result = ''
package/package.json CHANGED
@@ -1,15 +1,20 @@
1
1
  {
2
2
  "name": "bare-format",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "String formatting for JavaScript",
5
5
  "exports": {
6
- ".": "./index.js"
6
+ ".": {
7
+ "types": "./index.d.ts",
8
+ "default": "./index.js"
9
+ },
10
+ "./package": "./package.json"
7
11
  },
8
12
  "files": [
9
- "index.js"
13
+ "index.js",
14
+ "index.d.ts"
10
15
  ],
11
16
  "scripts": {
12
- "test": "standard && bare test.js"
17
+ "test": "prettier . --check && bare test.js"
13
18
  },
14
19
  "repository": {
15
20
  "type": "git",
@@ -26,6 +31,7 @@
26
31
  },
27
32
  "devDependencies": {
28
33
  "brittle": "^3.5.0",
29
- "standard": "^17.0.0"
34
+ "prettier": "^3.4.2",
35
+ "prettier-config-standard": "^7.0.0"
30
36
  }
31
37
  }