open-index/open-npm huggingface dataset:
npm package: @mizchi/physics
Description: A modular, extendable, and easy-to-use physics engine for javascript
Author: Jasper Palfree
Latest version: 0.7.0

# PhysicsJS

A modular, extendable, and easy-to-use physics engine for javascript.

Latest version: 0.7.0 (beta)

   **Looking for help!** If you would like to help maintain PhysicsJS, please contact me at jasper@wellcaffeinated.net
   
   Required Experience:
   * Experience with numerical physics simulation
   * Experience maintaining an open source javascript project

## Usage

**Please [visit the website](http://wellcaffeinated.net/PhysicsJS/) for
details about installation and usage**.

Distribution files are in the `dist/` directory.

## Contributing

Source code is kept in the `src/` directory. After any source code
modifications it will be necessary to run the grunt build task to
rebuild the source and run unit tests.

First install [grunt](http://gruntjs.com/).

Next install dev dependencies:

    $ npm install

then run grunt

    $ grunt

The default grunt task will create a `_working/` directory with the
PhysicsJS development build. You can play around with that.
**NOTE**: the `_working/` directory won't be committed
(it is in .gitignore).

After you run this you can use (Mr.doob's) htmleditor in `editor/` to play around.

If you want grunt to automatically create the development build
when you modify the source in `src/` then run:

    $ grunt watch

**Note** grunt watch won't run unit tests.

### Pull Requests

If you are contributing a bug-fix or a very minor addition, feel free to
do a pull request on the master branch.

If it is something else create a new (or existing) feature branch (eg: `feature/MY_FEAT`)
and issue a pull request on that.

If unsure, create an issue to discuss.

Please ensure that:

* the files in `dist/` are _unmodified_.
* the features you add are well documented with jsdoc comments if applicable.
* the code is indented with 4 space characters.

## License MIT

Copyright (c) 2013 Jasper Palfree http://wellcaffeinated.net/PhysicsJS/

Permission 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:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE 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.
npm package: @mizchi/puppeteer-helper
Description: Experimental puppeteer helper
Author: mizchi
Latest version: 0.1.1

# @mizchi/puppeteer-helper

Experimental puppeteer helper

## CLI

```
$ npm install -g @mizchi/puppeteer-helper
$ get-puppeteer-metrics https://dev.to
[Loading Stats]
 - FirstMeaningfulPaint: 0.216s
 - DomContentLoaded: 0.336s
[init~fsm]
TaskDuration: 0.4s / Usage 39%
  - ScriptDuration: 0.066s / 13.5%
  - LayoutDuration: 0.26s / 53.4%
  - RecalcStyleDuration: 0.019s / 3.9%
  - LayoutCount: +13
  - RecalcStyleCount: +19
```

with scenario.js

```js
module.exports = [
  async _page => {
    // Do something
    await new Promise(resolve => setTimeout(resolve, 1000))
    return {
      key: 'observe-with-wait'
    }
  }
]
```

```
$ get-puppeteer-metrics https://dev.to examples/scenario.js
[Loading Stats]
- FirstMeaningfulPaint: 0.478s
- DomContentLoaded: 0.248s
[init~fsm]
TaskDuration: 0.5s / Usage 41%
 - ScriptDuration: 0.082s / 14.6%
 - LayoutDuration: 0.29s / 51.9%
 - RecalcStyleDuration: 0.02s / 3.5%
 - LayoutCount: +10
 - RecalcStyleCount: +17
[fsm~observe-with-wait]
TaskDuration: 0s / Usage 4%
 - ScriptDuration: 0.025s / 59.9%
 - LayoutDuration: 0s / 0%
 - RecalcStyleDuration: 0s / 0%
 - LayoutCount: +0
 - RecalcStyleCount: +0
```

## Node API

```js
/* @flow */
import puppeteer from 'puppeteer'
import { run } from '@mizchi/puppeteer-helper'

const targetUrl = process.argv[2]

async function start() {
  const browser = await puppeteer.launch({})
  await run(browser, targetUrl, [
    _page => {
      return {
        key: 'FSM'
      }
    }
  ])
  await browser.close()
}

start()
```

## License

MIT by @mizchi