Initial commit

master
Freywar Ulvnaudgari 2 years ago
commit 5ce782aa0f
  1. 2
      .gitignore
  2. 7
      jest.config.js
  3. 19
      package.json
  4. 1
      src/core.ts
  5. 0
      src/index.ts
  6. 10
      test/core.spec.ts
  7. 24
      tsconfig.json
  8. 2216
      yarn.lock

2
.gitignore vendored

@ -0,0 +1,2 @@
node_modules
build

@ -0,0 +1,7 @@
module.exports = {
testEnvironment: "node",
transform: {
"^.+.tsx?$": ["ts-jest",{}],
},
};

@ -0,0 +1,19 @@
{
"name": "jlc",
"version": "1.0.0",
"main": "index.js",
"author": "Freywar Ulvnaudgari <freywar.ulvnaudgari@gmail.com>",
"license": "MIT",
"scripts": {
"build": "rm -rf build && tsc",
"run": "yarn build && node build/index.js",
"debug": "yarn build && node --inspect-brk build/index.js",
"test": "jest"
},
"devDependencies": {
"@jest/globals": "^29.7.0",
"jest": "^29.7.0",
"ts-jest": "^29.2.3",
"typescript": "^5.5.4"
}
}

@ -0,0 +1 @@
export const id = <T>(v: T) => v;

@ -0,0 +1,10 @@
import { describe, expect, test } from '@jest/globals';
import { id } from '../src/core';
describe('id', () => {
test('returns same value', () => {
expect(id(null)).toBe(null);
expect(id(1)).toBe(1);
expect(id(global)).toBe(global);
});
});

@ -0,0 +1,24 @@
{
"compilerOptions": {
"outDir": "build",
"target": "ES2022",
"module": "ES2022",
"moduleResolution": "Node",
"lib": [
"ES2022"
],
"noImplicitAny": true,
"noImplicitOverride": true,
"noImplicitReturns": true,
"noImplicitThis": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"strictNullChecks": true,
"strictPropertyInitialization": true,
"declaration": false,
"sourceMap": true,
},
"include": [
"src/**/*.ts",
],
}

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save