@revensky/primitives 1.0.0

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/LICENSE +21 -0
  2. package/README.md +11 -0
  3. package/package.json +65 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License Copyright (c) 2026 Revensky
2
+
3
+ Permission is hereby granted,
4
+ free of charge, to any person obtaining a copy of this software and associated
5
+ documentation files (the "Software"), to deal in the Software without
6
+ restriction, including without limitation the rights to use, copy, modify, merge,
7
+ publish, distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to the
9
+ following conditions:
10
+
11
+ The above copyright notice and this permission notice
12
+ (including the next paragraph) shall be included in all copies or substantial
13
+ portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
16
+ ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
18
+ EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
19
+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,11 @@
1
+ # @revensky/primitives
2
+
3
+ Library that provides enhanced functionalities for NodeJS' primitive types.
4
+
5
+ ## JSON
6
+
7
+ Enhances the JSON library by allowing the `jsonParse()` method to remove
8
+ the `__proto__` and `constructor` properties of any JSON object,
9
+ as they can be used to inject malicious code into the resulting object.
10
+
11
+ It also exposes a `jsonStringify()` method for stability purposes.
package/package.json ADDED
@@ -0,0 +1,65 @@
1
+ {
2
+ "name": "@revensky/primitives",
3
+ "version": "1.0.0",
4
+ "description": "Enhanced primitives functionalities for NodeJS.",
5
+ "license": "MIT",
6
+ "homepage": "https://github.com/revensky/primitives#readme",
7
+ "main": "dist/index.js",
8
+ "files": [
9
+ "dist"
10
+ ],
11
+ "bugs": {
12
+ "url": "https://github.com/revensky/primitives/issues"
13
+ },
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "git+ssh://git@github.com/revensky/primitives.git"
17
+ },
18
+ "author": {
19
+ "name": "Revensky",
20
+ "url": "https://github.com/revensky"
21
+ },
22
+ "publishConfig": {
23
+ "access": "public",
24
+ "registry": "https://registry.npmjs.org"
25
+ },
26
+ "keywords": [
27
+ "primitives",
28
+ "json",
29
+ "buffer",
30
+ "enum"
31
+ ],
32
+ "devDependencies": {
33
+ "@commitlint/cli": "^20.4.1",
34
+ "@commitlint/config-conventional": "^20.4.1",
35
+ "@eslint/js": "^10.0.1",
36
+ "@types/jest": "^30.0.0",
37
+ "@types/node": "^25.2.1",
38
+ "commitizen": "^4.3.1",
39
+ "cz-conventional-changelog": "^3.3.0",
40
+ "eslint": "^10.0.0",
41
+ "eslint-config-prettier": "^10.1.8",
42
+ "eslint-plugin-jest": "^29.12.2",
43
+ "eslint-plugin-prettier": "^5.5.5",
44
+ "eslint-plugin-simple-import-sort": "^12.1.1",
45
+ "globals": "^17.3.0",
46
+ "husky": "^9.1.7",
47
+ "jest": "^30.2.0",
48
+ "jest-environment-node": "^30.2.0",
49
+ "jest-extended": "^7.0.0",
50
+ "jest-util": "^30.2.0",
51
+ "jsonc-eslint-parser": "^2.4.2",
52
+ "lint-staged": "^16.2.7",
53
+ "neostandard": "^0.12.2",
54
+ "prettier": "^3.8.1",
55
+ "ts-jest": "^29.4.6",
56
+ "ts-node": "^10.9.2",
57
+ "typescript": "^5.9.3",
58
+ "typescript-eslint": "^8.54.0"
59
+ },
60
+ "scripts": {
61
+ "build": "pnpm exec tsc -p tsconfig.build.json",
62
+ "test": "pnpm exec jest",
63
+ "release": "pnpm run build && pnpm pack --pack-destination release && pnpm publish --access public"
64
+ }
65
+ }