@jblib/should 0.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.
@@ -0,0 +1,2 @@
1
+ import { shouldBeTrue } from "./should-be-true.js";
2
+ export { shouldBeTrue };
package/dist/index.js ADDED
@@ -0,0 +1,3 @@
1
+ import { shouldBeTrue } from "./should-be-true.js";
2
+
3
+ export { shouldBeTrue };
@@ -0,0 +1,5 @@
1
+ //#region src/should-be-true.d.ts
2
+ declare const shouldBeTrue: (v: unknown) => boolean;
3
+ //#endregion
4
+ export { shouldBeTrue };
5
+ //# sourceMappingURL=should-be-true.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"should-be-true.d.ts","names":[],"sources":["../src/should-be-true.ts"],"mappings":";cAAM,YAAA,GAAgB,CAAA"}
@@ -0,0 +1,6 @@
1
+ //#region src/should-be-true.ts
2
+ const shouldBeTrue = (v) => v === true;
3
+
4
+ //#endregion
5
+ export { shouldBeTrue };
6
+ //# sourceMappingURL=should-be-true.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"should-be-true.js","names":[],"sources":["../src/should-be-true.ts"],"sourcesContent":["const shouldBeTrue = (v: unknown): boolean => v === true\n\nexport { shouldBeTrue }\n"],"mappings":";AAAA,MAAM,gBAAgB,MAAwB,MAAM"}
@@ -0,0 +1,6 @@
1
+ import { jblibConfig } from '@jblib/eslint'
2
+ import { type Linter } from 'eslint'
3
+
4
+ const config: Linter.Config[] = [...jblibConfig]
5
+
6
+ export default config
package/package.json ADDED
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "@jblib/should",
3
+ "version": "0.0.1",
4
+ "description": "should",
5
+ "type": "module",
6
+ "scripts": {
7
+ "build": "tsdown",
8
+ "test": "vitest",
9
+ "lint": "eslint .",
10
+ "lint:fix": "eslint . --fix"
11
+ },
12
+ "devDependencies": {
13
+ "vitest": "catalog:",
14
+ "typescript": "catalog:",
15
+ "@jblib/eslint": "workspace:*",
16
+ "prettier": "catalog:",
17
+ "tsdown": "catalog:"
18
+ },
19
+ "keywords": [
20
+ "should"
21
+ ],
22
+ "author": {
23
+ "name": "Joseph Beck"
24
+ },
25
+ "repository": {
26
+ "type": "git",
27
+ "url": "git+https://github.com/joseph-beck/jblib.git",
28
+ "directory": "packages/should"
29
+ },
30
+ "license": "MIT",
31
+ "packageManager": "pnpm@10.33.0",
32
+ "exports": {
33
+ ".": "./src/index.ts",
34
+ "./package.json": "./package.json"
35
+ },
36
+ "publishConfig": {
37
+ "exports": {
38
+ ".": "./dist/index.js",
39
+ "./package.json": "./package.json"
40
+ }
41
+ }
42
+ }
package/src/index.ts ADDED
@@ -0,0 +1,3 @@
1
+ import { shouldBeTrue } from './should-be-true.js'
2
+
3
+ export { shouldBeTrue }
@@ -0,0 +1,22 @@
1
+ import { describe, expect, it } from 'vitest'
2
+
3
+ import { shouldBeTrue } from './should-be-true.js'
4
+
5
+ describe('should be true', () => {
6
+ it('should return true for true', () => {
7
+ expect(shouldBeTrue(true)).toBe(true)
8
+ })
9
+
10
+ it('should return false for false', () => {
11
+ expect(shouldBeTrue(false)).toBe(false)
12
+ })
13
+
14
+ it('should return false for non-true values', () => {
15
+ expect(shouldBeTrue(123)).toBe(false)
16
+ expect(shouldBeTrue('hello')).toBe(false)
17
+ expect(shouldBeTrue({})).toBe(false)
18
+ expect(shouldBeTrue([])).toBe(false)
19
+ expect(shouldBeTrue(null)).toBe(false)
20
+ expect(shouldBeTrue(undefined)).toBe(false)
21
+ })
22
+ })
@@ -0,0 +1,3 @@
1
+ const shouldBeTrue = (v: unknown): boolean => v === true
2
+
3
+ export { shouldBeTrue }
package/tsconfig.json ADDED
@@ -0,0 +1,8 @@
1
+ {
2
+ "extends": "../../tsconfig.base.json",
3
+ "compilerOptions": {
4
+ "composite": true,
5
+ "noEmit": false
6
+ },
7
+ "include": ["src", "*.config.ts"]
8
+ }
@@ -0,0 +1,23 @@
1
+ import { defineConfig } from 'tsdown'
2
+
3
+ export default defineConfig({
4
+ entry: ['./src/index.ts'],
5
+ format: ['esm'],
6
+ platform: 'node',
7
+ unbundle: true,
8
+ dts: true,
9
+ sourcemap: true,
10
+ clean: true,
11
+ minify: false,
12
+ fixedExtension: false,
13
+ exports: {
14
+ devExports: true,
15
+ },
16
+ publint: {
17
+ strict: true,
18
+ },
19
+ attw: {
20
+ profile: 'esm-only',
21
+ level: 'error',
22
+ },
23
+ })
@@ -0,0 +1,11 @@
1
+ import { defineConfig } from 'vitest/config'
2
+
3
+ export default defineConfig({
4
+ test: {
5
+ exclude: ['src/**/*.gen.ts'],
6
+ include: ['src/**/*.spec.ts'],
7
+ },
8
+ resolve: {
9
+ tsconfigPaths: true,
10
+ },
11
+ })