huan / node-facenet

Solve face verification, recognition and clustering problems: A TensorFlow backed FaceNet implementation for Node.js.
https://zixia.github.io/node-facenet/
Apache License 2.0
405 stars 77 forks source link

Fix `toJSON()` return type: should be `string` instead of `object` #151

Open huan opened 6 years ago

huan commented 6 years ago

This function should return a type string instead of object

https://github.com/zixia/node-facenet/blob/b1e4f4b62383699d4c2e670abfe00613e47d0828/src/face.ts#L331

According to https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify:

The JSON.stringify() method converts a JavaScript value to a JSON string JSON.stringify() converts a value to JSON notation representing it: If the value has a toJSON() method, it's responsible to define what data will be serialized.