Comparing version 1.0.1 to 1.0.2
15
index.js
var natives = process.binding('natives') | ||
var module = require('module') | ||
var normalRequire = require | ||
exports.src = src | ||
exports.source = src | ||
exports.require = req | ||
@@ -44,2 +44,15 @@ var vm = require('vm') | ||
// native_module isn't actually a natives binding. | ||
// weird, right? | ||
if (id === 'native_module') { | ||
return { | ||
getSource: src, | ||
wrap: function (script) { | ||
return wrap[0] + script + wrap[1] | ||
}, | ||
wrapper: wrap, | ||
_cache: cache | ||
} | ||
} | ||
var source = src(id) | ||
@@ -46,0 +59,0 @@ if (!source) { |
{ | ||
"name": "natives", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Do stuff with Node.js's native JavaScript modules", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "tap test/*.js --branches=100" | ||
"test": "tap test/*.js --branches=100 --lines=100 --statements=100 --functions=100" | ||
}, | ||
@@ -9,0 +9,0 @@ "repository": { |
@@ -9,4 +9,4 @@ # natives | ||
I feel compelled to give you a personalized word of warning if you are | ||
considering using this module. | ||
I feel compelled to give you a word of warning if you are considering | ||
using this module. | ||
@@ -13,0 +13,0 @@ This module lets you do some creative things with the JavaScript code |
5012
90