Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improvements to data types implementation #16

Merged
merged 3 commits into from
Jan 28, 2014
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
switched to named functions as suggested in #16
elf Pavlik committed Jan 28, 2014

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 294673b96cb554075641f606a0dde8e7288d6e71
7 changes: 3 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ function levelgraphJSONLD(db, jsonldOpts) {
options: jsonldOpts
};

var doPut = function(obj, options, callback) {
function doPut(obj, options, callback) {
var blanks = {};

jsonld.toRDF(obj, options, function(err, triples) {
@@ -127,7 +127,7 @@ function levelgraphJSONLD(db, jsonldOpts) {
};

// http://json-ld.org/spec/latest/json-ld-api/#data-round-tripping
var getCoercedObject = function(object) {
function getCoercedObject(object) {
var TYPES = {
PLAIN: 'http://www.w3.org/1999/02/22-rdf-syntax-ns#PlainLiteral',
BOOLEAN: XSDTYPE + 'boolean',
@@ -165,7 +165,7 @@ function levelgraphJSONLD(db, jsonldOpts) {
return coerced;
};

var fetchExpandedTriples = function(iri, memo, callback) {
function fetchExpandedTriples(iri, memo, callback) {
if (typeof memo === 'function') {
callback = memo;
memo = {};
@@ -240,4 +240,3 @@ function levelgraphJSONLD(db, jsonldOpts) {
}

module.exports = levelgraphJSONLD;