{"id":17348371,"url":"https://github.com/jmervine/node-yslowjs","last_synced_at":"2025-04-14T21:11:33.627Z","repository":{"id":9370606,"uuid":"11227079","full_name":"jmervine/node-yslowjs","owner":"jmervine","description":"Node.js wrapper for phantomjs yslow.js (see: http://yslow.org/phantomjs/).","archived":false,"fork":false,"pushed_at":"2016-02-20T01:15:42.000Z","size":69,"stargazers_count":9,"open_issues_count":1,"forks_count":6,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-02-23T00:01:41.258Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://mervine.net/projects/npms/yslowjs","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/jmervine.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":"2013-07-07T01:54:27.000Z","updated_at":"2022-07-27T09:57:00.000Z","dependencies_parsed_at":"2022-08-19T19:01:09.455Z","dependency_job_id":null,"html_url":"https://github.com/jmervine/node-yslowjs","commit_stats":null,"previous_names":["jmervine/yslowjs"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmervine%2Fnode-yslowjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmervine%2Fnode-yslowjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmervine%2Fnode-yslowjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmervine%2Fnode-yslowjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jmervine","download_url":"https://codeload.github.com/jmervine/node-yslowjs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240780708,"owners_count":19856411,"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":[],"created_at":"2024-10-15T16:52:09.037Z","updated_at":"2025-02-26T02:31:42.352Z","avatar_url":"https://github.com/jmervine.png","language":"JavaScript","readme":"# YSlow.js on Node.js\n\n[![Build Status](https://travis-ci.org/jmervine/node-yslowjs.png?branch=master)](https://travis-ci.org/jmervine/node-yslowjs) \u0026nbsp; [![Dependancy Status](https://david-dm.org/jmervine/node-yslowjs.png)](https://david-dm.org/jmervine/node-yslowjs) \u0026nbsp; [![NPM Version](https://badge.fury.io/js/yslowjs.png)](https://badge.fury.io/js/yslowjs) \u0026nbsp;  \u003ciframe src=\"http://jmervine.github.io/npm-downloads-badge/badge.html?module=yslowjs\u0026name=false\" allowtransparency=\"true\" frameborder=\"0\" scrolling=\"0\" width=\"125\" height=\"20\" style=\"vertical-align: bottom\"\u003e\u003c/iframe\u003e\n\n\nYSlow.js on [Node.js](http://mervine.net/nodejs) is a simple [Node.js](http://mervine.net/nodejs) wrapper for programmatically running [`phantomjs yslow.js`](http://yslow.org/phantomjs/).\n\n## Links\n\n* [package](https://npmjs.org/package/yslowjs)\n* [source](https://github.com/jmervine/node-yslowjs)\n* [tests](https://travis-ci.org/jmervine/yslowjs)\n\n## Requirements\n\n1. [PhantomJS](http://phantomjs.org/) in your `PATH`.\n2. Tested on the following node versions (via [Travis-ci.org](http://travis-ci.org)):\n    - 0.8\n    - 0.10\n\n## Installation\n\n    :::shell\n    $ npm install yslowjs\n\n\u003e See [Phapper](http://mervine.net/projects/npms/phapper) if you're having issues with PhantomJS.\n\n#### Additional Installation Notes\n\nYou can specify different versions of [YSlow.js](http://mervine.net/yslowjs) using `npm config`:\n\n    $ npm config set yslowjs_version\n\n\u003e You will have to reinstall `yslowjs` if you change this option after initially installing it.\n\n#### [Windows? Click here!](https://github.com/jmervine/node-yslowjs/blob/master/NOTES.mdown)\n\n## Configuration Options\n\n    :::js\n    var yslow = new YSlow('http://example.com/path/foo',\n        [ '--arg', 'value' ]);\n        // Supported:\n        //   info     specify the information to display/log (basic|grade|stats|comps|all) [all],\n        //   ruleset  specify the YSlow performance ruleset to be used (ydefault|yslow1|yblog) [ydefault],\n        //   beacon   specify an URL to log the results,\n        //   ua       specify the user agent string sent to server when the page requests resources,\n        //   viewport specify page viewport size WxY, where W = width and H = height [400x300],\n        //   headers  specify custom request headers, e.g.: -ch '{\\'Cookie\\': \\'foo=bar\\'}',\n        // WARNING: format is locked at json, so don't pass it!\n\n## Usage Examples\n\n#### Async\n\n    :::js\n    // file: async.js\n    var YSlow = require('lib/yslow');\n    var yslow = new YSlow('http://mervine.net/projects/npms/yslowjs',\n        [ '--info', 'basic' ]);\n    console.log('\\nRunning (Async)....');\n    yslow.run( function (error, result) {\n        if (error) {\n            console.trace(error);\n        } else {\n            console.log('=\u003e overall:   ' + result.o);\n            console.log('=\u003e load time: ' + result.lt);\n        }\n    });\n\n#### Sync\n\n    :::js\n    // file: sync.js\n    var YSlow = require('lib/yslow');\n    var yslow = new YSlow('http://mervine.net/projects/npms/yslowjs',\n        [ '--info', 'basic' ]);\n    console.log('\\nRunning (Sync)....');\n    var results = yslow.runSync();\n    console.log('=\u003e overall:   ' + results.o);\n    console.log('=\u003e load time: ' + results.lt);\n\n#### Using Custom `yslow.js` Download\n\n    :::js\n    var YSlow = require('lib/yslow');\n    YSlow.prototype.script = '/path/to/your/yslow.js';\n    // continue on\n\n## MIT License\n\nCopyright (c) 2015 Joshua Mervine\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n","funding_links":[],"categories":["Analyzers - API"],"sub_categories":["Meetups"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmervine%2Fnode-yslowjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjmervine%2Fnode-yslowjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmervine%2Fnode-yslowjs/lists"}