https://github.com/ironsource/node-chrome-unmirror
https://github.com/ironsource/node-chrome-unmirror
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ironsource/node-chrome-unmirror
- Owner: ironSource
- License: mit
- Created: 2016-04-14T11:12:42.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-06-17T06:47:13.000Z (about 10 years ago)
- Last Synced: 2025-04-06T08:43:19.444Z (about 1 year ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 0
- Watchers: 5
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# chrome-unmirror
**Transform mirror objects from a remote Chrome debugger into local values.**
[](https://www.npmjs.org/package/chrome-unmirror) [](https://www.npmjs.org/package/chrome-unmirror)
## example
```js
const unmirror = require('chrome-unmirror')
const remoteObject
= { type: 'object'
, objectId: '{"injectedScriptId":1,"id":2}'
, subtype: 'regexp'
, className: 'RegExp'
, description: '/flamingo/i'
, preview:
{ type: 'object'
, description: '/flamingo/i'
, lossless: true
, overflow: false
, properties:
[ { name: 'source', type: 'string', value: 'flamingo' }
, { name: 'global', type: 'boolean', value: 'false' }
, { name: 'ignoreCase', type: 'boolean', value: 'true' }
, { name: 'multiline', type: 'boolean', value: 'false' }
, { name: 'lastIndex', type: 'number', value: '0' } ]
, subtype: 'regexp' } }
// Returns a RegExp instance: /flamingo/i
unmirror(remoteObject)
```
## install
With [npm](https://npmjs.org) do:
```
npm install chrome-unmirror
```
## tests
Unit tests are currently performed as part of the test suite of an external, unpublished module. Apologies.
## license
[MIT](http://opensource.org/licenses/MIT) © [ironSource](http://www.ironsrc.com/).