https://github.com/emoji-gen/clone-into
:fire: Wrapper function for Firefox's cloneInto
https://github.com/emoji-gen/clone-into
firefox javascript webextensions
Last synced: about 2 months ago
JSON representation
:fire: Wrapper function for Firefox's cloneInto
- Host: GitHub
- URL: https://github.com/emoji-gen/clone-into
- Owner: emoji-gen
- License: mit
- Created: 2017-01-30T21:31:45.000Z (over 9 years ago)
- Default Branch: main
- Last Pushed: 2025-08-24T05:49:30.000Z (10 months ago)
- Last Synced: 2025-12-05T06:56:27.920Z (7 months ago)
- Topics: firefox, javascript, webextensions
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/@emoji-gen/clone-into
- Size: 51.8 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# clone-into [](https://www.npmjs.org/package/@emoji-gen/clone-into) [](https://github.com/emoji-gen/clone-into/actions/workflows/build.yml) [](LICENSE)
:fire: Wrapper function for Firefox's [cloneInto](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Sharing_objects_with_page_scripts)
## Getting started
```sh
$ npm install --save @emoji-gen/clone-into # for npm users
$ yarn add @emoji-gen/clone-into # for yarn users
```
If it execute on Google Chrome or other browsers, this function return an argument obj as it is.
```js
import { cloneInto } from '@emoji-gen/clone-into'
const obj = { data: [ 1, 2, 3 ] }
const clonedObj = cloneInto(obj, document.defaultView)
```
## Features
- Supports TypeScript
- Supports both CommonJS and ESModules
## Development
### Build
```
$ yarn run build
```
### Test
```
$ yarn test
```
## License
MIT © [Emoji Generator](https://emoji-gen.ninja/)