New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@tenon-io/tenon-node

Package Overview
Dependencies
Maintainers
6
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tenon-io/tenon-node

Node.js wrapper for the Tenon.io API

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
decreased by-16.67%
Maintainers
6
Weekly downloads
 
Created
Source

Active maintenance of tenon-node has moved to tenon-io/tenon-node.

Node.js wrapper for the Tenon.io API

NPM

Build Status

Getting Started

Install the module with: npm install @tenon-io/tenon-node

const tenonNode = require('tenon-node');

// Create an instance with your API key
const tenonApi = new tenonNode({
    key: 'YOUR_API_KEY_HERE',
    endPoint: 'http://tenon.io' // or your private tenon instance
});

tenonApi.analyze('http://www.example.com', function(err, result) {
    if (err) {
        console.error(err);
    } else {
        console.log('Tenon.checkUrl', result);
    }
});

Documentation

Each of the following methods takes an optional options object that can be More information about available options can be found in the Tenon API documentation.

analyze(string, [options,] callback)

Tests a given url, code snippet or full HTML page for accessibility issues.

checkUrl(url, [options,] callback)

Tests a given URL for accessibility issues.

checkSrc(src, [options,] callback)

Tests a complete HTML document for accessibility issues.

Note: if you want to test a fragment, block or snippet of code against Tenon, then use checkFragment() or specify fragment: '1' in your options.

checkFragment(src, [options,] callback)

Tests a fragment, block or snippet of code for accessibility issues.

Examples

See example/tenon-node_example.js

Contributing

In lieu of a formal style guide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.

License

Copyright (c) 2014 Justin Stockton
Licensed under the MIT license.

Keywords

FAQs

Package last updated on 23 Feb 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc