bplist-creator
Advanced tools
Comparing version 0.0.6 to 0.0.7
@@ -144,2 +144,5 @@ 'use strict'; | ||
break; | ||
case 'date': | ||
writeDate(entry); | ||
break; | ||
case 'data': | ||
@@ -153,2 +156,8 @@ writeData(entry); | ||
function writeDate(entry) { | ||
writeByte(0x33); | ||
var date = (Date.parse(entry.value)/1000) - 978307200 | ||
writeDouble(date) | ||
} | ||
function writeDict(entry) { | ||
@@ -330,5 +339,12 @@ if (debug) { | ||
} else if (typeof(dicts) === 'object') { | ||
if (Object.keys(dicts).length == 1 && typeof(dicts.UID) === 'number') { | ||
if (dicts instanceof Date) { | ||
return [ | ||
{ | ||
type: 'date', | ||
value: dicts | ||
} | ||
] | ||
} else if (Object.keys(dicts).length == 1 && typeof(dicts.UID) === 'number') { | ||
return [ | ||
{ | ||
type: 'UID', | ||
@@ -335,0 +351,0 @@ value: dicts.UID |
{ | ||
"name": "bplist-creator", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"description": "Binary Mac OS X Plist (property list) creator.", | ||
@@ -5,0 +5,0 @@ "main": "bplistCreator.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
53389
577