text-content

0.0.3 • Public • Published

text-content

text-content is a cross-browser function for getting and setting the text value of a DOM element.

Build status

Browser support

Install

npm install text-content

Example

var text = require('text-content')
 
var span = document.createElement('span')
text(span, 'Some text')
 
console.log(text(span))
// => Some text

It can also be used on the server with mkdom.

License

MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.3
    246
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.3
    246
  • 0.0.2
    1
  • 0.0.1
    3
  • 0.0.0
    1

Package Sidebar

Install

npm i text-content

Weekly Downloads

44

Version

0.0.3

License

MIT

Last publish

Collaborators

  • michaelrhodes