{"_id":"@brahimemo/standard-js","_rev":"3-67efc7a6b9baa70c08eae955ca69f665","name":"@brahimemo/standard-js","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.0":{"name":"@brahimemo/standard-js","version":"1.0.0","keywords":["js","ts","javascript","typescript","std","standard","standard library","types"],"author":{"name":"brahimEmo"},"license":"MIT","_id":"@brahimemo/standard-js@1.0.0","maintainers":[{"name":"brahimemo","email":"brahime373@gmail.com"}],"homepage":"https://github.com/brahimEmo/standard-js#readme","bugs":{"url":"https://github.com/brahimEmo/standard-js/issues"},"dist":{"shasum":"4df0df3ee2c71184732562e82e15151347dd237e","tarball":"https://registry.npmjs.org/@brahimemo/standard-js/-/standard-js-1.0.0.tgz","fileCount":11,"integrity":"sha512-1ftGAhceuIRG2yImpbMWH8RPdNr9c1DBOeRv4sJuM1aKWUb0dirq1uGjI9AVVFM5Kx2B3MFxYiN4unwkW4N4sQ==","signatures":[{"sig":"MEQCIBryQsq5/jGQvrBTlf0tVvH/hUmfJuLUYvHnouhIi98NAiBOYieMvzymgwrE3MZxHai3YW5V4O/MuvLgaZXaqypsgw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":82529},"main":"lib/index.js","types":"types/index.d.ts","module":"esm/index.js","engines":{"node":">=12.0.0"},"gitHead":"1295aa986b1aaafc8e0146d576643b8da1bc45cc","scripts":{"build":"tsc && tsc -p tsconfig.cjs.json"},"_npmUser":{"name":"brahimemo","email":"brahime373@gmail.com"},"repository":{"url":"git+https://github.com/brahimEmo/standard-js.git","type":"git"},"_npmVersion":"10.9.0","description":"A JavaScript/TypeScript library that provides type definitions and predefined constants inspired by the Go standard library.","directories":{},"_nodeVersion":"21.6.0","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/standard-js_1.0.0_1731809384732_0.0714278053324644","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@brahimemo/standard-js","version":"1.0.1","keywords":["js","ts","javascript","typescript","std","standard","standard library","types"],"author":{"name":"brahimEmo"},"license":"MIT","_id":"@brahimemo/standard-js@1.0.1","maintainers":[{"name":"brahimemo","email":"brahime373@gmail.com"}],"homepage":"https://github.com/brahimEmo/standard-js#readme","bugs":{"url":"https://github.com/brahimEmo/standard-js/issues"},"dist":{"shasum":"9d42bbbeb5815ea666ece1e6436b3b05c04c91e6","tarball":"https://registry.npmjs.org/@brahimemo/standard-js/-/standard-js-1.0.1.tgz","fileCount":11,"integrity":"sha512-PK+jLKzUXZVwlhrFEtwEooLN7shN1rJ6AZAaC3LTGoDymVZ9VfjzrOSs74vZBM5NJpFnrm82Xv3Ce2qwfJEQsQ==","signatures":[{"sig":"MEYCIQCOerPiHwezJMFF/Jjm69oEHl6T9BNFcMN8Z/6Mx6GSRAIhALUE57TGasxzd4WBHipanB0ddwQkIKhhhOkRR456IE8s","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":84051},"main":"lib/index.js","types":"types/index.d.ts","module":"esm/index.js","engines":{"node":">=12.0.0"},"gitHead":"6bf406657227edce794be20d9c0a5b0a9ec34e10","scripts":{"build":"tsc && tsc -p tsconfig.cjs.json"},"_npmUser":{"name":"brahimemo","email":"brahime373@gmail.com"},"repository":{"url":"git+https://github.com/brahimEmo/standard-js.git","type":"git"},"_npmVersion":"10.9.0","description":"A JavaScript/TypeScript library that provides type definitions and predefined constants inspired by the Go standard library.","directories":{},"_nodeVersion":"21.6.0","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/standard-js_1.0.1_1731811028852_0.3424310194103224","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"@brahimemo/standard-js","version":"1.0.2","keywords":["js","ts","javascript","typescript","std","standard","standard library","types"],"author":{"name":"brahimEmo"},"license":"MIT","_id":"@brahimemo/standard-js@1.0.2","maintainers":[{"name":"brahimemo","email":"brahime373@gmail.com"}],"homepage":"https://github.com/brahimEmo/standard-js#readme","bugs":{"url":"https://github.com/brahimEmo/standard-js/issues"},"dist":{"shasum":"9e4d797e2b8f0950d316ff76a1e79802d05bfb72","tarball":"https://registry.npmjs.org/@brahimemo/standard-js/-/standard-js-1.0.2.tgz","fileCount":19,"integrity":"sha512-2waEwQ2IRMrwnZUvtTAGyIzcBTE14h7pvl0ej00TedpkXTx/bdyIffH3d5+Hi+aozt/rRt3K058gF6qJhhsrWg==","signatures":[{"sig":"MEUCICl6TW2C+jK3RzRDwKoR0Jk938MVWzZNO2361M7TBprxAiEA67eFZDSyNpllyJhGmRFVNDp7Ji9lTL5oxERMseYVLNM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":94530},"main":"lib/index.js","types":"types/index.d.ts","module":"esm/index.js","engines":{"node":">=12.0.0"},"gitHead":"130ace4e0b1ed7e97f43e580166fb04753d79728","scripts":{"build":"tsc && tsc -p tsconfig.cjs.json"},"_npmUser":{"name":"brahimemo","email":"brahime373@gmail.com"},"repository":{"url":"git+https://github.com/brahimEmo/standard-js.git","type":"git"},"_npmVersion":"10.9.0","description":"A JavaScript/TypeScript library that provides type definitions and predefined constants inspired by the Go standard library.","directories":{},"_nodeVersion":"21.6.0","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/standard-js_1.0.2_1732133442694_0.0760797852529258","host":"s3://npm-registry-packages"}},"1.0.3":{"name":"@brahimemo/standard-js","version":"1.0.3","description":"A JavaScript/TypeScript library that provides type definitions and predefined constants inspired by the Go standard library.","main":"lib/index.js","module":"esm/index.js","types":"types/index.d.ts","scripts":{"build":"tsc && tsc -p tsconfig.cjs.json"},"keywords":["js","ts","javascript","typescript","std","standard","standard library","types"],"author":{"name":"brahimEmo"},"license":"MIT","dependencies":{},"devDependencies":{"typescript":"^4.0.0"},"repository":{"type":"git","url":"git+https://github.com/brahimEmo/standard-js.git"},"bugs":{"url":"https://github.com/brahimEmo/standard-js/issues"},"homepage":"https://github.com/brahimEmo/standard-js#readme","engines":{"node":">=12.0.0"},"_id":"@brahimemo/standard-js@1.0.3","gitHead":"130ace4e0b1ed7e97f43e580166fb04753d79728","_nodeVersion":"21.6.0","_npmVersion":"10.9.0","dist":{"integrity":"sha512-4xCI628OTvZjdqRyTDxHu8Ci0TGH/b1R/wfYEN/y1jRbFE+FANBM0VwUJY8Satm4KDzu8rseIKk4eL6BZ61naQ==","shasum":"fe8e74ebe617a659855e88b167dbaffb4f14bcab","tarball":"https://registry.npmjs.org/@brahimemo/standard-js/-/standard-js-1.0.3.tgz","fileCount":23,"unpackedSize":115445,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDO3NMViBn6xr0PYbMxwAk3pXjjxkKiefa75d0BKQQR8QIhAJdQLpZnGSFXauBYHsYZu2X+SA8LKvMITR7kRTevuf7F"}]},"_npmUser":{"name":"brahimemo","email":"brahime373@gmail.com"},"directories":{},"maintainers":[{"name":"brahimemo","email":"brahime373@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/standard-js_1.0.3_1732228368369_0.41260922163661884"},"_hasShrinkwrap":false}},"time":{"created":"2024-11-17T02:09:44.638Z","modified":"2024-11-21T22:32:48.738Z","1.0.0":"2024-11-17T02:09:44.999Z","1.0.1":"2024-11-17T02:37:09.126Z","1.0.2":"2024-11-20T20:10:42.877Z","1.0.3":"2024-11-21T22:32:48.565Z"},"bugs":{"url":"https://github.com/brahimEmo/standard-js/issues"},"author":{"name":"brahimEmo"},"license":"MIT","homepage":"https://github.com/brahimEmo/standard-js#readme","keywords":["js","ts","javascript","typescript","std","standard","standard library","types"],"repository":{"type":"git","url":"git+https://github.com/brahimEmo/standard-js.git"},"description":"A JavaScript/TypeScript library that provides type definitions and predefined constants inspired by the Go standard library.","maintainers":[{"name":"brahimemo","email":"brahime373@gmail.com"}],"readme":"# Standard-JS Package\r\n\r\nThe `standard-js` package provides common types and constants for HTTP methods, status codes, mathematical constants, and date/time formats. It is designed to simplify development in your applications by offering predefined values that can be easily imported and used.\r\n\r\n## Installation\r\n\r\nTo install this module, you can use npm, Yarn, Bun, or pnpm:\r\n\r\n```bash\r\nnpm install @brahimemo/standard-js\r\n```\r\n\r\n```bash\r\nyarn add @brahimemo/standard-js\r\n```\r\n\r\n```bash\r\nbun install @brahimemo/standard-js\r\n```\r\n\r\n```bash\r\npnpm add @brahimemo/standard-js\r\n```\r\n\r\n## Usage\r\n\r\n### Importing HTTP Methods\r\n\r\nYou can import the HTTP methods and use them in your application:\r\n\r\n```typescript\r\nimport { HTTPMethods } from \"@brahimemo/standard-js/http\";\r\n\r\nconsole.log(HTTPMethods.Get); // \"GET\"\r\nconsole.log(HTTPMethods.Post); // \"POST\"\r\n```\r\n\r\n### Importing HTTP Status Codes\r\n\r\nYou can also import the HTTP status codes:\r\n\r\n```typescript\r\nimport { StatusCodes } from \"@brahimemo/standard-js/http\";\r\n\r\nconsole.log(StatusCodes.StatusOK); // 200\r\nconsole.log(StatusCodes.StatusNotFound); // 404\r\n```\r\n\r\n### Available HTTP Methods\r\n\r\n- `GET`\r\n- `HEAD`\r\n- `POST`\r\n- `PUT`\r\n- `PATCH`\r\n- `DELETE`\r\n- `CONNECT`\r\n- `OPTIONS`\r\n- `TRACE`\r\n\r\n### Available HTTP Status Codes\r\n\r\n- **1xx Informational**\r\n\r\n  - `StatusContinue` (100)\r\n  - `StatusSwitchingProtocols` (101)\r\n  - `StatusProcessing` (102)\r\n  - `StatusEarlyHints` (103)\r\n\r\n- **2xx Success**\r\n\r\n  - `StatusOK` (200)\r\n  - `StatusCreated` (201)\r\n  - `StatusAccepted` (202)\r\n  - `StatusNoContent` (204)\r\n\r\n- **3xx Redirection**\r\n\r\n  - `StatusMovedPermanently` (301)\r\n  - `StatusFound` (302)\r\n  - `StatusNotModified` (304)\r\n\r\n- **4xx Client Errors**\r\n\r\n  - `StatusBadRequest` (400)\r\n  - `StatusUnauthorized` (401)\r\n  - `StatusNotFound` (404)\r\n\r\n- **5xx Server Errors**\r\n  - `StatusInternalServerError` (500)\r\n  - `StatusNotImplemented` (501)\r\n\r\n### Importing Mathematical Constants\r\n\r\nYou can import mathematical constants like this:\r\n\r\n```typescript\r\nimport { Math } from \"@brahimemo/standard-js/math\";\r\n\r\nconsole.log(Math.Pi); // 3.141592653589793\r\nconsole.log(Math.Expo); // 2.718281828459045\r\n```\r\n\r\n### Available Mathematical Constants\r\n\r\n- `Math.Expo`\r\n- `Math.Pi`\r\n- `Math.Phi`\r\n- `Math.Sqrt2`\r\n- `Math.SlfE`\r\n- `Math.Ln2`\r\n- And more...\r\n\r\n### Importing Date/Time Formats\r\n\r\nYou can import date and time formats as follows:\r\n\r\n```typescript\r\nimport { Formats } from \"@brahimemo/standard-js/time\";\r\n\r\nconsole.log(Formats.RFC3339); // \"yyyy-MM-ddTHH:mm:ssZ\"\r\nconsole.log(Formats.Kitchen); // \"h:mma\"\r\n```\r\n\r\n### Available Date/Time Formats\r\n\r\n- `Formats.Layout`\r\n- `Formats.ANSIC`\r\n- `Formats.RFC3339`\r\n- `Formats.Kitchen`\r\n- And more...\r\n\r\n## Contributing\r\n\r\nWe welcome contributions! Please follow these steps:\r\n\r\n1. Fork the repository.\r\n2. Create a new branch (`git checkout -b feature-branch`).\r\n3. Make your changes and commit them (`git commit -m 'Add new feature'`).\r\n4. Push to the branch (`git push origin feature-branch`).\r\n5. Create a pull request.\r\n\r\n## License\r\n\r\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\r\n","readmeFilename":"README.md"}