{"id":24518678,"url":"https://github.com/acidjazz/objectus","last_synced_at":"2026-05-01T18:33:01.396Z","repository":{"id":57312952,"uuid":"47286285","full_name":"acidjazz/objectus","owner":"acidjazz","description":"Compile a recursive directory tree of JSON and YML files into an object","archived":false,"fork":false,"pushed_at":"2017-02-08T23:44:01.000Z","size":283,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-04-29T14:55:01.481Z","etag":null,"topics":["gulp","javascript","json","yaml"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/acidjazz.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-12-02T20:21:33.000Z","updated_at":"2020-01-04T04:30:52.000Z","dependencies_parsed_at":"2022-09-20T23:10:39.326Z","dependency_job_id":null,"html_url":"https://github.com/acidjazz/objectus","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/acidjazz/objectus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acidjazz%2Fobjectus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acidjazz%2Fobjectus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acidjazz%2Fobjectus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acidjazz%2Fobjectus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/acidjazz","download_url":"https://codeload.github.com/acidjazz/objectus/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acidjazz%2Fobjectus/sbom","scorecard":{"id":162913,"data":{"date":"2025-08-11","repo":{"name":"github.com/acidjazz/objectus","commit":"b62d40c43f956812d3247213c29a6dca3656df76"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-16T14:02:39.616Z","repository_id":57312952,"created_at":"2025-08-16T14:02:39.616Z","updated_at":"2025-08-16T14:02:39.616Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32508901,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gulp","javascript","json","yaml"],"created_at":"2025-01-22T01:46:31.720Z","updated_at":"2026-05-01T18:33:01.375Z","avatar_url":"https://github.com/acidjazz.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![](media/logo128.png)\nobjectus\n========\n\nCompile a recursive directory tree of JSON and YML files into an object\n\n[![npm version](https://badge.fury.io/js/objectus.svg)](https://badge.fury.io/js/objectus)\n![Licence](https://img.shields.io/npm/l/objectus.svg?style=flat-square\u0026label=licence)\n[![Build Status](http://img.shields.io/travis/acidjazz/objectus/master.svg?style=flat)](https://travis-ci.org/acidjazz/objectus)\n[![Dependency Status](https://gemnasium.com/acidjazz/objectus.svg)](https://gemnasium.com/acidjazz/objectus)\n[![Coverage Status](https://coveralls.io/repos/github/acidjazz/objectus/badge.svg?branch=master)](https://coveralls.io/github/acidjazz/objectus?branch=master)\n[![codecov](https://codecov.io/gh/acidjazz/objectus/branch/master/graph/badge.svg)](https://codecov.io/gh/acidjazz/objectus)\n[![Code Climate](https://codeclimate.com/github/acidjazz/objectus/badges/gpa.svg)](https://codeclimate.com/github/acidjazz/objectus)\n\n[![NPM](https://nodei.co/npm/objectus.png)](https://nodei.co/npm/objectus/)\n\n\n```javascript\nvar objectus = require('objectus');\n\nobjectus('config/', function(error, result) {\n  if (error) { console.log(error); }\n  console.log(result);\n});\n```\n\n### How it works\nAll YAML and JSON files in the specified folder becomes one single object.  Folders and file names become keys and values are the content \n\u003e *Note*: Specifying a key in a folder that is the same name of a directory will result in one overwriting the other\n\n### Why?\n\n* Unify data that is needed in multiple preprocessors like meta tags, colors, fonts, etc.\n  * Ex: I define [colors](https://github.com/acidjazz/sake/blob/master/config/colors.yml) and [fonts](https://github.com/acidjazz/sake/blob/master/config/fonts.yaml) to [populate](https://github.com/acidjazz/sake/blob/master/sty/guide.styl#L4-L10) a [style guide](http://www.designsakestudio.com/guide/), and then use them throughout the [HTML](https://github.com/acidjazz/sake/blob/master/tpl/guide/index.jade#L11) and [CSS](https://github.com/acidjazz/sake/blob/master/sty/main.styl#L18) preprocessors\n* Allow the possibility of others to contribute who are not familiar with the technology in use\n  * Give copywriters access to their copy seamlessly\n  * Give designers access to font and color values seamlessly\n\n### Installation\n\n```bash\n$ npm install objectus\n```\n\n\n### Basic Usage\n\nSay you have all your config \u0026 copy in the folder `config/` and your meta tags in `config/meta.yml` looking like\n\n```yaml\n---\nurl: http://www.example.url/\ntags:\n  title: website title\n  description: \"website description\"\n```\n\nIf you ran \n\n```javascript\nobjectus('config/', function(error, result) {\n  console.log(result);\n});\n```\n\nYou would see \n\n```javascript\nmeta: {\n  url: \"http://www.example.url/\",\n  tags: {\n    title: \"website title\",\n    description: \"website description\"\n  }\n}\n```\n\nNow throw in some colors you need accessed in HTML and CSS in `config/guide/` called `colors.yml` and\n\n```yml\n---\nblue1: \"#0000FF\"\nred1: \"#FF0000\"\n```\n\n..will stack and then result in\n\n```javascript\nmeta: {\n  url: \"http://www.example.url/\",\n  tags: {\n    title: \"website title\",\n    description: \"website description\"\n  }\n},\nguide: {\n  colors: {\n    blue1: \"#0000FF\",\n    red1: \"#FF0000\"\n  }\n}\n\n```\n\n### Integration \n\n#### [Gulp](https://github.com/gulpjs/gulp)\nStart with grabbing our data, then a task to do the same\n\n```javascript\n\nvar objectus = reuqire('objectus');\n\nobjectus('config/', function(error, result) { data = result; });\n\ngulp.task('objectus', function() {\n  objectus('config/', function(error, result) {\n    data = result;\n  });\n  return true;\n});\n```\n\nNow you have `data` as a global object you can pass into any task needed. Make sure when you are watching files that are compiled passing objectus, you fire your objectus task first, so they get the updated data\n\n```javascript\ngulp.watch('config/**/*', ['objectus','stylus','jade']);\n```\n\n#### [Stylus](http://stylus-lang.com/)\n\nStylus has a define parameter you can pass, making the 3rd option true allows it to be passed 'raw'\n\n```javascript\nstylus(str).define('data', data, true)\n```\n\nIn Gulp we use [gulp-stylus](https://github.com/stevelacy/gulp-stylus) and [accord](https://github.com/jenius/accord) using rawDefine which [I made sure works](https://github.com/stevelacy/gulp-stylus/issues/151)\n\n```javascript\ngulp.task('stylus', function() {\n  gulp.src('sty/main.styl')\n    .pipe(stylus({ rawDefine: { data: data } })\n    .pipe(gulp.dest('pub/css'))\n});\n```\n\n#### [Sass](https://github.com/sass/node-sass) (node-sass)\n\nWe'll write to a file somewhere you can `@import` it, make sure this is done before the sass compilation\n\n```javascript\nfs.writeFileSync('pub/jst/data.js', \"var data = \" + JSON.stringify(data) + \";\", 'utf8')\n```\n```sass\n@import 'pub/jst/data.json'\n```\n\u003e *Note*: If you know of a better way of doing this please let me know\n\n#### Javascript / CoffeeScript\n\nSame simplicity, just dump our data somewhere to pick it up client-side\n\n```javascript\nfs.writeFileSync('pub/jst/data.js', \"var data = \" + JSON.stringify(data) + \";\", 'utf8')\n```\n```html\n\u003cscript type=\"text/javascript\" src=\"/jst/data.js\" /\u003e\n```\n\n#### [Jade](https://github.com/pugjs/jade) / [the new name](https://github.com/scrooloose/syntastic/pull/1704) Pug\n\nJade has a locals parameter, perfect \n\n```javascript\ngulp.task('jade', function() {\n  gulp.src('tpl/**/index.jade')\n    .pipe(jade({pretty: true, locals: {data: data}}))\n    .pipe(gulp.dest('pub'))\n});\n```\n#### Detailed Example\n\nHere is a more detailed example with Stylus and Jade involving browserSync, gulp-notify, and gulp-sourcemaps\n\n```javascript\n\nvar gulp = require('gulp');\nvar sync = require('browser-sync').create();\nvar notify = require('gulp-notify');\nvar stylus = require('gulp-stylus');\nvar jade = require('gulp-jade');\nvar sourcemaps = require('gulp-sourcemaps');\n\nvar objectus = require('objectus');\n\nobjectus('config/', function(error, result) {\n  if (error) {\n    notify(error);\n  }\n  data = result;\n});\n\ngulp.task('objectus', function() {\n  objectus('config/', function(error, result) {\n    if (error) {\n      notify(error);\n    }\n    data = result;\n  });\n  return true;\n});\n\ngulp.task('stylus', function() {\n  gulp.src('sty/main.styl')\n    .pipe(sourcemaps.init())\n    .pipe(stylus({ rawDefine: { data: data } })\n    .on('error', notify.onError(function(error) {\n      return {title: \"Stylus error: \" + error.name, message: error.message, sound: 'Pop' };\n    })))\n    .pipe(sourcemaps.write())\n    .pipe(gulp.dest('pub/css'))\n    .pipe(sync.stream());\n});\n\n\ngulp.task('jade', function() {\n  gulp.src('tpl/**/index.jade')\n    .pipe(jade({pretty: true, locals: {data: data}})\n      .on('error', notify.onError(function(error) {\n        return {title: \"Jade error: \" + error.name, message: error.message, sound: 'Pop' };\n      }))\n      .on('error', function(error) {\n        console.log(error);\n      })\n    )\n    .pipe(gulp.dest('pub'))\n    .pipe(sync.stream());\n});\n\ngulp.task('sync', function() {\n  sync.init({\n    server: {\n      baseDir: 'pub/',\n    }\n  });\n\n  gulp.watch('config/**/*', ['objectus','stylus','jade']);\n  gulp.watch('sty/**/*.styl', ['stylus']);\n  gulp.watch('tpl/**/*.jade', ['jade']);\n\n});\n\ngulp.task('default', ['objectus','stylus', 'jade']);\n\n```\n\n### Why call it __objectus__\n\nThe origin of the word __object__\n\n\u003e Middle English, from Medieval Latin objectum, from Latin, neuter of __objectus__, past participle of obicere to throw in the way, present, hinder, from ob- in the way + jacere to throw\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facidjazz%2Fobjectus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Facidjazz%2Fobjectus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facidjazz%2Fobjectus/lists"}