{"id":17262839,"url":"https://github.com/jpwilliams/essupernext","last_synced_at":"2025-04-14T07:33:29.009Z","repository":{"id":57230580,"uuid":"87317707","full_name":"jpwilliams/essupernext","owner":"jpwilliams","description":"ES2018 a.k.a. \"ESSuper-Next\". Dot-syntax and keyword conversion.","archived":false,"fork":false,"pushed_at":"2017-04-05T15:23:34.000Z","size":5,"stargazers_count":13,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T21:11:09.142Z","etag":null,"topics":["ecmascript","ecmascript2018","es2018","essupernext","supernext"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jpwilliams.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-04-05T14:15:27.000Z","updated_at":"2020-08-08T22:04:50.000Z","dependencies_parsed_at":"2022-09-07T16:12:09.065Z","dependency_job_id":null,"html_url":"https://github.com/jpwilliams/essupernext","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpwilliams%2Fessupernext","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpwilliams%2Fessupernext/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpwilliams%2Fessupernext/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpwilliams%2Fessupernext/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jpwilliams","download_url":"https://codeload.github.com/jpwilliams/essupernext/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248839460,"owners_count":21169817,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["ecmascript","ecmascript2018","es2018","essupernext","supernext"],"created_at":"2024-10-15T07:54:51.032Z","updated_at":"2025-04-14T07:33:28.922Z","avatar_url":"https://github.com/jpwilliams.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# essupernext\n\n![Build Status](https://img.shields.io/badge/build-passing-brightgreen.svg)\n![Coverage](https://img.shields.io/badge/coverage-100%25-brightgreen.svg)\n![Downloads](https://img.shields.io/badge/downloads-319k/month-brightgreen.svg)\n![https://npmjs.com/package/essupernext](https://img.shields.io/npm/v/essupernext.svg)\n[![Month](https://img.shields.io/badge/month-april-ff69b4.svg)](https://en.wikipedia.org/wiki/April_Fools%27_Day)\n\nES2018 a.k.a. \"ESSuper-Next\". Dot-syntax and keyword conversion.\n\n[![ES2018 First Look - it changes everything](http://i.imgur.com/Nr4MYev.png)](https://youtu.be/s-G_RZ4RJLU \"ES2018 First Look - it changes everything\")\n\nHandy DIY compiler for dot syntax to get your code ready for ES2018.\n\n### Usage\n\n``` js\nnpm install -g essupernext\nessupernext index.js\n```\n\n### Example output\n\n(_GitHub, stupidly, doesn't support proper highlighting for ES2018, so this will look off. Still tonnes more readable though!_)\n\n``` js\nc joi . require.'joi'.\nc commentsDb . require.'connection-mongo'..'comments'.\nc ObjectId . require.'connection-mongo'..ObjectId\nc remit . require.'connection-remit'.\nc log . require.'connection-logger'.\nc validate . require.'service-helpers'..remit. log..validate\n\nm.exports . .. .. .\n  remit.res.'comments.create'. .\n    validate.joi.object...keys..\n      user: joi.string...trim...regex./^.0-9a-fA-F..24.$/..required...\n      content: joi.string...trim...regex./^.0-9a-fA-F..24.$/..\n      task: joi.string...trim...regex./^.0-9a-fA-F..24.$/..\n      comment: joi.string...trim...required..\n    ...xor.'content'. 'task'...\n\n    createComment\n  ..\n.\n\nf createComment .args. done. .\n  l doc . .\n    user: ObjectId.args.parsed.user..\n    comment: args.parsed.comment\n  .\n\n  if .args.parsed.content. .\n    doc.content . ObjectId.args.parsed.content.\n  . else .\n    doc.task . ObjectId.args.parsed.task.\n  .\n\n  commentsDb\n    .collection.'comments'.\n    .insertOne.doc. .err. result. .. .\n      if .err. .\n        log.error.new E.err..\n\n        r done.err.\n      .\n\n      if .result.insertedCount. .\n        remit.emit.'comments.created'. result.ops.0..\n      .\n\n      r done.null. result.ops.0..\n    ..\n.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpwilliams%2Fessupernext","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjpwilliams%2Fessupernext","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpwilliams%2Fessupernext/lists"}