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

base-elements

Package Overview
Dependencies
Maintainers
2
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

base-elements - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

4

avatar.js

@@ -10,3 +10,3 @@ const assert = require('assert')

const cls = opts.class || ''
const size = 'w' + (opts.size || 3)
const size = 'w' + (opts.size || 3) + ' ' + 'h' + (opts.size || 3)
const radius = 'br' + ((opts.radius)

@@ -23,3 +23,3 @@ ? (opts.radius === 100)

assert.equal(typeof radius, 'string', 'base-elements/avatar: radius should be a string')
assert.ok(size === 'w1' || size === 'w1' || size === 'w2' || size === 'w3' || size === 'w4' || size === 'w5', 'base-elements/avatar: size should be >= 1 && <= 5')
assert.ok(size === 'w1 h1' || size === 'w2 h2' || size === 'w3 h3' || size === 'w4 h4' || size === 'w5 h5', 'base-elements/avatar: size should be >= 1 && <= 5')
assert.ok(radius === 'br-100' || radius === 'br0' || radius === 'br1' || radius === 'br2' || radius === 'br3' || radius === 'br4', 'base-elements/avatar: radius should be >= 0 && <= 4 OR 100')

@@ -26,0 +26,0 @@

{
"name": "base-elements",
"version": "2.0.0",
"version": "2.0.1",
"description": "A selection of native DOM elements",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -14,9 +14,11 @@ const css = require('sheetify')

module.exports = progressElement
// create a progress bar
// (num, obj?) -> html
module.exports = function (value, opts) {
function progressElement (value, opts) {
opts = opts || {}
const cls = opts.class || ''
const direction = opts.reverse
const _class = opts.class || ''
const reverse = opts.reverse

@@ -26,12 +28,11 @@ assert.equal(typeof value, 'number', 'base-elements/progress: value should be a number')

assert.equal(typeof opts, 'object', 'base-elements/progress: opts should be an object')
assert.equal(typeof cls, 'string', 'base-elements/progress: opts.class should be a string')
assert.equal(typeof _class, 'string', 'base-elements/progress: opts.class should be a string')
const directionClass = (direction) ? ('reverse') : ''
const directionClass = (reverse) ? ('reverse') : ''
const classes = 'w-100 db bn input-reset br-100 h1' +
' ' + _class +
' ' + prefix +
' ' + directionClass
// TODO(yw): patch sheetify so we can create global styles, inline
const classStyle = 'w-100 db bn input-reset br-100 h1 ' + cls + ' ' + prefix + ' ' + directionClass
return html`
<progress class=${classStyle} value=${value}></progress>
`
return html`<progress class=${classes} value=${value}></progress>`
}
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