Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gaspard-collection

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gaspard-collection

Manipulate collection of DOM elements

  • 0.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Gaspard-collection

Manipulate collection of DOM elements

Gaspard-collection size Build Status Coverage Status

npm version devDependency Status Commitizen friendly

:fire: Use gaspard's Collection to queries elements and perform actions on each :fire:

Getting started

Installing

npmyarnbower jsDelivr
npm install gaspard-collectionyarn add gaspard-collectionbower install gaspard-collectiongaspard-collection.umd.js

Usage

Include gaspard-collection on your project

// Via ES2015 import statement
import GaspardCollection from 'gaspard-collection'

// or via Commonjs
const GaspardCollection = require('gaspard-collection')
const collection = new GaspardCollection('div.highlight')
collection
  .css('background-color', 'green')
  .find('p:first-child') // returns a new gaspard collection
  .addClass('introduction')
  .fadeIn(400)
  .elements // Array of matched elements
  .forEach(element => {
    console.log('div.highlight first paragraph', element)
  })

Or use gaspard-collection within a <script>

<script src="https://cdn.jsdelivr.net/npm/gaspard@latest/dist/gaspard.umd.js"></script>
<script src="https://cdn.jsdelivr.net/npm/gaspard-collection@latest/dist/gaspard-collection.umd.js"></script>
<script>
const collection = new GaspardCollection('div.highlight')
collection
  .css('background-color', 'green')
</script>

API documentation

  • Latest Documentation

  • Markdown

Contribute

  • Fork the repository
  • Clone it locally and install dependencies with npm (or yarn)
    npm install
    
  • Create a new branch
  • Develop your feature/fix with tests running
    npm run test:watch
    
  • Commit, Push your branch and make a pull request on gaspard repository

Licensing

MIT License Copyright (c) 2017 Luca Perret

Keywords

FAQs

Package last updated on 23 Mar 2018

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