Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 19 days 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 (about 8 years ago)
- Default Branch: main
- Last Pushed: 2022-07-20T08:21:48.000Z (over 2 years ago)
- Last Synced: 2024-11-22T00:51:34.522Z (3 months ago)
- Topics: firefox, javascript, webextensions
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/@emoji-gen/clone-into
- Size: 46.9 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# clone-into [![npm](https://img.shields.io/npm/v/@emoji-gen/clone-into.svg?maxAge=2592000)](https://www.npmjs.org/package/@emoji-gen/clone-into) [![build](https://github.com/emoji-gen/clone-into/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/emoji-gen/clone-into/actions/workflows/build.yml) [![License](https://img.shields.io/github/license/emoji-gen/clone-into.svg)](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/)