1 | # Node.js ABI
|
2 |
|
3 | [![Build Status](https://travis-ci.org/lgeiger/node-abi.svg?branch=v1.0.0)](https://travis-ci.org/lgeiger/node-abi) [![Greenkeeper badge](https://badges.greenkeeper.io/lgeiger/node-abi.svg)](https://greenkeeper.io/)
|
4 |
|
5 |
|
6 | Get the Node ABI for a given target and runtime, and vice versa.
|
7 |
|
8 | ## Installation
|
9 | ```
|
10 | npm install node-abi
|
11 | ```
|
12 |
|
13 | ## Usage
|
14 | ```javascript
|
15 | const nodeAbi = require('node-abi')
|
16 |
|
17 | nodeAbi.getAbi('7.2.0', 'node')
|
18 | // '51'
|
19 | nodeAbi.getAbi('1.4.10', 'electron')
|
20 | // '50'
|
21 | nodeAbi.getTarget('51', 'node')
|
22 | // '7.2.0'
|
23 | nodeAbi.getTarget('50', 'electron')
|
24 | // '1.4.15'
|
25 |
|
26 | nodeAbi.allTargets
|
27 | // [
|
28 | // { runtime: 'node', target: '0.10.48', abi: '11', lts: false },
|
29 | // { runtime: 'node', target: '0.12.17', abi: '14', lts: false },
|
30 | // { runtime: 'node', target: '4.6.1', abi: '46', lts: true },
|
31 | // { runtime: 'node', target: '5.12.0', abi: '47', lts: false },
|
32 | // { runtime: 'node', target: '6.9.4', abi: '48', lts: true },
|
33 | // { runtime: 'node', target: '7.4.0', abi: '51', lts: false },
|
34 | // { runtime: 'electron', target: '1.0.2', abi: '47', lts: false },
|
35 | // { runtime: 'electron', target: '1.2.8', abi: '48', lts: false },
|
36 | // { runtime: 'electron', target: '1.3.13', abi: '49', lts: false },
|
37 | // { runtime: 'electron', target: '1.4.15', abi: '50', lts: false }
|
38 | // ]
|
39 | nodeAbi.deprecatedTargets
|
40 | nodeAbi.supportedTargets
|
41 | nodeAbi.additionalTargets
|
42 | nodeAbi.futureTargets
|
43 | // ...
|
44 | ```
|
45 |
|
46 | ## References
|
47 |
|
48 | - https://github.com/lgeiger/electron-abi
|
49 | - https://nodejs.org/en/download/releases/
|
50 | - https://github.com/nodejs/LTS
|