Socket
Socket
Sign inDemoInstall

bindings

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bindings - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

20

bindings.js

@@ -16,3 +16,3 @@

, arch: process.arch
, version: parseFloat(process.versions.node).toString()
, version: parseVersion(process.versions.node)
, bindings: 'bindings.node'

@@ -146,1 +146,19 @@ , try: [

}
/**
* Accepts a String like "v0.10.4" and returns a String
* containing the major and minor versions ("0.10").
*/
function parseVersion (str) {
var regexp = /^(\d+)\.(\d+)/
str = String(str)
if (str[0] === 'v') {
str = str.substring(1)
}
var m = str.match(regexp)
return m ? m[0] : null
}
exports.parseVersion = parseVersion

2

package.json
{ "name": "bindings"
, "description": "Helper module for loading your native module's bindings in a cross-platform way"
, "keywords": [ "native", "addon", "bindings", "gyp" ]
, "version": "0.2.1"
, "version": "0.2.2"
, "author": "Nathan Rajlich <nathan@tootallnate.net> (http://tootallnate.net)"

@@ -6,0 +6,0 @@ , "repository": { "type": "git", "url": "git://github.com/TooTallNate/node-bindings.git" }

@@ -9,3 +9,3 @@ node-bindings

to do that. This adds two new burdens on the developer that we now need to
condider while writing our module:
consider while writing our module:

@@ -31,3 +31,3 @@ 1. You now have to compile the bindings yourself, before publishing the module.

On 64-bit Mac OS X, running node `v0.7.1-pre`, then the bindings file should be
On 64-bit Mac OS X, running node `v0.7.1`, then the bindings file should be
placed in:

@@ -64,4 +64,4 @@

`require()`ing the proper bindings file for the given platform and architecture
and node version is as simple as:
`require()`ing the proper bindings file for the current node version, platform
and architecture is as simple as:

@@ -78,3 +78,3 @@ ``` js

``` js
var bindings = require('bindings')('my_bindings.node')
var bindings = require('bindings')('my_bindings')
```

@@ -87,3 +87,3 @@

var bindings = require('bindings')({
bindings: 'my_bindings.node'
bindings: 'my_bindings'
, compiled: 'builddir'

@@ -90,0 +90,0 @@ })

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc