阿西河

所有教程

公众号
🌙
阿西河前端的公众号

我的收藏

    最近访问  (文章)

      教程列表

      抓包专区
      测试专区

      Node.js N-API 处理 JavaScript 值

      Node.js N-API 处理 JavaScript 值

      N-API exposes a set of APIs to create all types of JavaScript values. Some of these types are documented under

      of the ECMAScript Language Specification.

      Fundamentally, these APIs are used to do one of the following: 1. Create a new JavaScript object 2. Convert from a primitive C type to an N-API value 3. Convert from N-API value to a primitive C type 4. Get global instances including undefined and null

      N-API values are represented by the type napi_value. Any N-API call that requires a JavaScript value takes in a napi_value. In some cases, the API does check the type of the napi_value up-front. However, for better performance, it’s better for the caller to make sure that the napi_value in question is of the JavaScript type expected by the API.


      更多内容请参考:Node.js N-API,或者通过 点击对应菜单 进行查看;


      目录
      本文目录
      目录