copy-simple

1.0.2 • Public • Published

copy.js

copy-simple.js is a painless copy helper for JavaScript.

Usage

There are different functions to copy values. All methods will return true or false;

import the library

import copy from 'copy-simple';

Copy Element Value - val()

<input id="testVal" type="text" value="Test 2-3-4">
var copiedValue = copy("#testVal").val()

Copy Element Text - text()

<div id="test">Test Content</div>
var copiedText = copy("#test").text()

Copy Element HTML - html()

<div id="test2">Test Content2</div>
var copiedHtml = copy("#test2").html()

Copy Current URL - url()

var copiedUrl = copy().url()

Copy Selected Text - selected()

<div>My Text</div>
var copiedSelected = copy().selected()

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i copy-simple

      Weekly Downloads

      8

      Version

      1.0.2

      License

      ISC

      Unpacked Size

      2.55 kB

      Total Files

      4

      Last publish

      Collaborators

      • aligoren