diff --git a/lib/ini.js b/lib/ini.js deleted file mode 100644 index b942082cba..0000000000 --- a/lib/ini.js +++ /dev/null @@ -1,81 +0,0 @@ -var sys = require('sys'); - -sys.error('The "ini" module will be removed in future versions of Node, please extract it into your own code.'); - -// TODO: -// 1. Handle quoted strings, including line breaks, so that this: -// foo = "bar -// baz" -// parses to {foo:"bar\n baz"} -// 2. Escape with \, so that this: -// foo = bar\ -// \"baz -// parses to {foo:"bar\n \"baz"} - -exports.parse = function(d) { - var ini = {'-':{}}; - - var section = '-'; - - var lines = d.split('\n'); - for (var i=0; i Binding(const Arguments& args) { exports->Set(String::New("fs"), String::New(native_fs)); exports->Set(String::New("http"), String::New(native_http)); exports->Set(String::New("crypto"), String::New(native_crypto)); - exports->Set(String::New("ini"), String::New(native_ini)); exports->Set(String::New("net"), String::New(native_net)); exports->Set(String::New("posix"), String::New(native_posix)); exports->Set(String::New("querystring"), String::New(native_querystring)); diff --git a/test/simple/test-ini.js b/test/simple/test-ini.js deleted file mode 100644 index 2d2bb55122..0000000000 --- a/test/simple/test-ini.js +++ /dev/null @@ -1,59 +0,0 @@ -require("../common"); -var path = require('path'), - fs = require("fs"), - ini = require("ini"), - parse = require("ini").parse; - -debug("load fixtures/fixture.ini"); - -p = path.join(fixturesDir, "fixture.ini"); - -fs.readFile(p, 'utf8', function(err, data) { - if (err) throw err; - - assert.equal(typeof parse, 'function'); - - var iniContents = parse(data); - assert.equal(typeof iniContents, 'object'); - - var expect = { "-" : - { "root" : "something" - , "url" : "http://example.com/?foo=bar" - } - , "the section with whitespace" : - { "this has whitespace" : "yep" - , "just a flag, no value." : true - } - , "section" : - { "one" : "two" - , "Foo" : "Bar" - , "this" : "Your Mother!" - , "blank" : "" - } - , "Section Two" : - { "something else" : "blah" - , "remove" : "whitespace" - } - }, - expectStr = "root = something\n"+ - "url = http://example.com/?foo=bar\n"+ - "[the section with whitespace]\n"+ - "this has whitespace = yep\n"+ - "just a flag, no value.\n"+ - "[section]\n"+ - "one = two\n"+ - "Foo = Bar\n"+ - "this = Your Mother!\n"+ - "blank = \n"+ - "[Section Two]\n"+ - "something else = blah\n"+ - "remove = whitespace\n"; - - assert.deepEqual(iniContents, expect, - "actual: \n"+inspect(iniContents) +"\n≠\nexpected:\n"+inspect(expect)); - - assert.equal(ini.stringify(iniContents), expectStr, - "actual: \n"+inspect(ini.stringify(iniContents)) +"\n≠\nexpected:\n"+inspect(expectStr)); -}); - -