perfect-payload 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.
package/.babelrc ADDED
@@ -0,0 +1,4 @@
1
+ {
2
+ "presets": ["@babel/preset-env"]
3
+ }
4
+
package/README.md CHANGED
@@ -0,0 +1,4 @@
1
+ ### USAGE
2
+
3
+ const helloWorld = require('my-npm-package');
4
+ console.log(helloWorld()); // Outputs: Hello, world!
package/index.js CHANGED
@@ -1,5 +1,3 @@
1
- function helloWorld() {
2
- return "Hello, world!";
1
+ export function helloWorld(message, jsonData) {
2
+ return JSON.stringify(jsonData) + " " + message;
3
3
  }
4
-
5
- module.exports = helloWorld;
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "perfect-payload",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
+ "type": "module",
4
5
  "description": "JSON Data Validation",
5
6
  "main": "index.js",
6
7
  "scripts": {
7
- "test": "echo \"Error: no test specified\" && exit 1"
8
+ "test": "jest"
8
9
  },
9
10
  "repository": {
10
11
  "type": "git",
@@ -27,6 +28,9 @@
27
28
  },
28
29
  "homepage": "https://github.com/kiranpoojary/perfect-payload#readme",
29
30
  "devDependencies": {
31
+ "@babel/core": "^7.25.2",
32
+ "@babel/preset-env": "^7.25.4",
33
+ "babel-jest": "^29.7.0",
30
34
  "jest": "^29.7.0"
31
35
  }
32
36
  }
@@ -1,4 +1,4 @@
1
- const helloWorld = require("../index");
1
+ import { helloWorld } from "../index.js";
2
2
 
3
3
  test("should return Hello, world!", () => {
4
4
  expect(helloWorld()).toBe("Hello, world!");