New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

libyaml

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

libyaml - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

jsl.conf

13

package.json
{
"name": "libyaml",
"version": "0.0.2",
"version": "0.0.3",
"description": "Bindings to libYAML",

@@ -18,6 +18,13 @@

"engines": {
"node": "0.4"
"node": ">=0.4.0"
},
"dependencies": {},
"devDependencies": {
"underscore": "1",
"tap": "0.0.x"
},
"scripts": {
"install": "node-waf configure build"
"install": "node-waf configure build",
"test": "tap ./tests/*.js"
},

@@ -24,0 +31,0 @@

@@ -1,2 +0,2 @@

// YAML.node, © 2010 Stéphan Kochen
// YAML.node, © 2011 Stéphan Kochen
// MIT-licensed. (See the included LICENSE file.)

@@ -46,4 +46,6 @@

if (m) {
var s = m[2], length = s.length; result = 0, i;
for (i = 0; i < length; i++) {
var s = m[2],
length = s.length,
result = 0;
for (var i = 0; i < length; i++) {
if (s[i] == '_')

@@ -63,8 +65,9 @@ continue;

if (m) {
var offset = 0, dateTimePart = m[1].replace('t', 'T');
var dateTimePart = m[1].replace('t', 'T'),
offset = 0;
if (m[2] && m[2] !== 'Z') {
var parts = m[2].split(':');
offset = parseInt(parts[0]) * 100;
offset = parseInt(parts[0], 10) * 100;
if (parts.length == 2)
offset += parseInt(parts[1]);
offset += parseInt(parts[1], 10);
}

@@ -79,4 +82,6 @@ if (offset >= 0)

// Regular numbers.
if (canParseIntRe.test(v)) return parseInt( v.replace(underscoresRe, ''));
if (canParseFloatRe.test(v)) return parseFloat(v.replace(underscoresRe, ''));
if (canParseIntRe.test(v))
return parseInt(v.replace(underscoresRe, ''), 0);
if (canParseFloatRe.test(v))
return parseFloat(v.replace(underscoresRe, ''));

@@ -86,9 +91,11 @@ // Times.

if (m) {
var parts = m[2].split(':'), length = parts.length, result = 0, i;
for (i = 0; i < parts.length; i++) {
var parts = m[2].split(':'),
length = parts.length,
result = 0;
for (var i = 0; i < length; i++) {
result *= 60;
if (i + 1 == parts.length)
if (length == i + 1)
result += parseFloat(parts[i]);
else
result += parseInt(parts[i]);
result += parseInt(parts[i], 10);
}

@@ -243,2 +250,5 @@ if (m[1] == '-')

}
else if (item instanceof Date) {
emitter.scalar(item.toISOString());
}
else if (item.length) {

@@ -262,4 +272,13 @@ emitter.sequence(function() {

break;
case "number":
if (item === Infinity)
emitter.scalar(".inf");
else if (item === -Infinity)
emitter.scalar("-.inf");
else if (isNaN(item))
emitter.scalar(".NaN");
else
emitter.scalar(String(item));
break;
default:
// FIXME: Properly serialize some special scalars (inf, datetimes, etc.)
emitter.scalar(String(item));

@@ -287,1 +306,21 @@ break;

};
// Helper for quickly writing out a file.
exports.dumpFile = function(filename) {
var documents = Array.prototype.slice.call(arguments, 1),
numDocuments = documents.length,
callback;
if (numDocuments !== 0 && typeof documents[numDocuments - 1] === 'function')
callback = documents.pop();
var data = exports.dump.apply(this, documents);
fs.writeFile(filename, data, callback);
};
// Synchronous version of dumpFile.
exports.dumpFileSync = function(filename) {
var documents = Array.prototype.slice.call(arguments, 1);
var data = exports.dump.apply(this, documents);
fs.writeFileSync(filename, data);
};

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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