https://github.com/shihabmridha/nodejs-cpp-addon-exp
Experiment on NodeJS C/C++ addon (N-API)
https://github.com/shihabmridha/nodejs-cpp-addon-exp
cpp nodejs nodejs-napi
Last synced: 11 months ago
JSON representation
Experiment on NodeJS C/C++ addon (N-API)
- Host: GitHub
- URL: https://github.com/shihabmridha/nodejs-cpp-addon-exp
- Owner: shihabmridha
- Created: 2020-08-08T21:19:53.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-08-08T21:53:58.000Z (over 5 years ago)
- Last Synced: 2025-01-05T15:48:49.397Z (about 1 year ago)
- Topics: cpp, nodejs, nodejs-napi
- Language: C++
- Homepage:
- Size: 190 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## NodeJS C++ Addon with N-API (Experiment)
### Target:
- Parse a JSON file using [simdjson](https://github.com/simdjson/simdjson/).
- Pass key of JSON field to retrive the value and a callback.
- Pass the retrived value from C++ to JavaScript as an argument of given callback.
### Test:
```
addon.test('key', (value) => {
console.log(value); // should print the value retrived from json file
});
```