package.json 6.2 KB
{
  "_args": [
    [
      {
        "raw": "ffi@>= 1.2.3",
        "scope": null,
        "escapedName": "ffi",
        "name": "ffi",
        "rawSpec": ">= 1.2.3",
        "spec": ">=1.2.3",
        "type": "range"
      },
      "/Users/fzy/project/koa2_Sequelize_project/node_modules/win32api"
    ]
  ],
  "_from": "ffi@>=1.2.3",
  "_id": "ffi@2.2.0",
  "_inCache": true,
  "_location": "/ffi",
  "_nodeVersion": "7.0.0",
  "_npmOperationalInternal": {
    "host": "packages-18-east.internal.npmjs.com",
    "tmp": "tmp/ffi-2.2.0.tgz_1477771032787_0.04706223588436842"
  },
  "_npmUser": {
    "name": "tootallnate",
    "email": "nathan@tootallnate.net"
  },
  "_npmVersion": "3.10.8",
  "_phantomChildren": {},
  "_requested": {
    "raw": "ffi@>= 1.2.3",
    "scope": null,
    "escapedName": "ffi",
    "name": "ffi",
    "rawSpec": ">= 1.2.3",
    "spec": ">=1.2.3",
    "type": "range"
  },
  "_requiredBy": [
    "/win32api"
  ],
  "_resolved": "https://registry.npmjs.org/ffi/-/ffi-2.2.0.tgz",
  "_shasum": "bf18b04666a29f71227ed56895d5430af47042fa",
  "_shrinkwrap": null,
  "_spec": "ffi@>= 1.2.3",
  "_where": "/Users/fzy/project/koa2_Sequelize_project/node_modules/win32api",
  "author": {
    "name": "Rick Branson"
  },
  "bugs": {
    "url": "http://github.com/node-ffi/node-ffi/issues"
  },
  "contributors": [
    {
      "name": "Nathan Rajlich",
      "email": "nathan@tootallnate.net",
      "url": "http://tootallnate.net"
    },
    {
      "name": "Gabor Mezo",
      "email": "gabor.mezo@outlook.com",
      "url": "https://github.com/unbornchikken"
    }
  ],
  "dependencies": {
    "bindings": "~1.2.0",
    "debug": "2",
    "nan": "2",
    "ref": "1",
    "ref-struct": "1"
  },
  "description": "A foreign function interface (FFI) for Node.js",
  "devDependencies": {
    "fs-extra": "^0.23.1",
    "mocha": "*",
    "ref-array": "1"
  },
  "directories": {},
  "dist": {
    "shasum": "bf18b04666a29f71227ed56895d5430af47042fa",
    "tarball": "https://registry.npmjs.org/ffi/-/ffi-2.2.0.tgz"
  },
  "engines": {
    "node": ">=0.10.0"
  },
  "gitHead": "67aa2c3b277be55cc563f73f32ac9730f6abcbef",
  "gypfile": true,
  "homepage": "http://github.com/node-ffi/node-ffi",
  "keywords": [
    "foreign",
    "function",
    "interface",
    "ffi",
    "libffi",
    "binding",
    "c"
  ],
  "license": "MIT",
  "main": "./lib/ffi",
  "maintainers": [
    {
      "name": "tootallnate",
      "email": "nathan@tootallnate.net"
    }
  ],
  "name": "ffi",
  "optionalDependencies": {},
  "readme": "node-ffi\n========\n### Node.js Foreign Function Interface\n[![Build Status](https://travis-ci.org/node-ffi/node-ffi.svg?branch=master)](https://travis-ci.org/node-ffi/node-ffi)\n[![Build Status](https://ci.appveyor.com/api/projects/status/n81apam1igfw8491?svg=true)](https://ci.appveyor.com/project/TooTallNate/node-ffi)\n\n`node-ffi` is a Node.js addon for loading and calling dynamic libraries using\npure JavaScript. It can be used to create bindings to native libraries without\nwriting any C++ code.\n\nIt also simplifies the augmentation of node.js with C code as it takes care of\nhandling the translation of types across JavaScript and C, which can add reams\nof boilerplate code to your otherwise simple C. See the `example/factorial`\nfor an example of this use case.\n\n**WARNING**: node-ffi assumes you know what you're doing. You can pretty easily\ncreate situations where you will segfault the interpreter and unless you've got\nC debugger skills, you probably won't know what's going on.\n\nExample\n-------\n\n``` js\nvar ffi = require('ffi');\n\nvar libm = ffi.Library('libm', {\n  'ceil': [ 'double', [ 'double' ] ]\n});\nlibm.ceil(1.5); // 2\n\n// You can also access just functions in the current process by passing a null\nvar current = ffi.Library(null, {\n  'atoi': [ 'int', [ 'string' ] ]\n});\ncurrent.atoi('1234'); // 1234\n```\n\nFor a more detailed introduction, see the [node-ffi tutorial page][tutorial].\n\nRequirements\n------------\n\n * Linux, OS X, Windows, or Solaris.\n * `libffi` comes bundled with node-ffi; it does *not* need to be installed on your system.\n * The current version is tested to run on node v0.6, v0.8, v0.9 and v0.10.\n\nInstallation\n------------\n\nMake sure you've installed all the [necessary build\ntools](https://github.com/TooTallNate/node-gyp#installation) for your platform,\nthen invoke:\n\n``` bash\n$ npm install ffi\n```\n\nSource Install / Manual Compilation\n-----------------------------------\n\nTo compile from source it's easiest to use\n[`node-gyp`](https://github.com/TooTallNate/node-gyp):\n\n``` bash\n$ npm install -g node-gyp\n```\n\nNow you can compile `node-ffi`:\n\n``` bash\n$ git clone git://github.com/node-ffi/node-ffi.git\n$ cd node-ffi\n$ node-gyp rebuild\n```\n\nTypes\n-----\n\nThe types that you specify in function declarations correspond to ref's types\nsystem. So [see its docs][ref-types] for\na reference if you are unfamiliar.\n\nV8 and 64-bit Types\n-------------------\n\nInternally, V8 stores integers that will fit into a 32-bit space in a 32-bit\ninteger, and those that fall outside of this get put into double-precision\nfloating point numbers. This is problematic because FP numbers are imprecise.\nTo get around this, the methods in node-ffi that deal with 64-bit integers return\nstrings and can accept strings as parameters.\n\nCall Overhead\n-------------\n\nThere is non-trivial overhead associated with FFI calls. Comparing a hard-coded\nbinding version of `strtoul()` to an FFI version of `strtoul()` shows that the\nnative hard-coded binding is orders of magnitude faster. So don't just use the\nC version of a function just because it's faster. There's a significant cost in\nFFI calls, so make them worth it.\n\nLicense\n-------\n\nMIT License. See the `LICENSE` file.\n\n[v1apichanges]: https://github.com/node-ffi/node-ffi/wiki/API-changes-from-v0.x-to-v1.x\n[tutorial]: https://github.com/node-ffi/node-ffi/wiki/Node-FFI-Tutorial\n[ref-types]: https://github.com/TooTallNate/ref#built-in-types\n",
  "readmeFilename": "README.md",
  "repository": {
    "type": "git",
    "url": "git+ssh://git@github.com/node-ffi/node-ffi.git"
  },
  "scripts": {
    "install": "node-gyp rebuild",
    "test": "node-gyp rebuild --directory test && mocha -gc --reporter spec"
  },
  "version": "2.2.0"
}