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

basicplaceholder

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

basicplaceholder - npm Package Compare versions

Comparing version 1.4.6 to 1.4.7

CHANGELOG.md

2

dist/basicPlaceholder.min.js

@@ -1,1 +0,1 @@

!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.basicPlaceholder=e()}}(function(){return function e(t,r,n){function l(i,o){if(!r[i]){if(!t[i]){var u="function"==typeof require&&require;if(!o&&u)return u(i,!0);if(a)return a(i,!0);var d=new Error("Cannot find module '"+i+"'");throw d.code="MODULE_NOT_FOUND",d}var c=r[i]={exports:{}};t[i][0].call(c.exports,function(e){var r=t[i][1][e];return l(r?r:e)},c,c.exports,e,t,r,n)}return r[i].exports}for(var a="function"==typeof require&&require,i=0;i<n.length;i++)l(n[i]);return l}({1:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=null,l=null,a=(r.init=function(){var e=arguments.length<=0||void 0===arguments[0]?[]:arguments[0],t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];n=t.errorText||"Invalid",l=t.warningText||"Invalid";for(var r=0;r<e.length;++r){var a=e[r];d(a),a.oninput=u}return!0},function(e){var t=e.getAttribute("data-basicPlaceholder-error");return null!==t&&"false"!==t}),i=function(e){var t=e.getAttribute("data-basicPlaceholder-warning");return null!==t&&"false"!==t},o=function(e){var t=e.getAttribute("data-basicPlaceholder-persistent");return null!==t&&"false"!==t},u=function(){var e=this,t=a(e),r=i(e);t===!0&&c(e),r===!0&&c(e),e.value.length>0?d(e):c(e)},d=function(e){var t=null,r=e.getAttribute("data-basicPlaceholder-text"),u=e.parentElement,d=a(e),c=i(e),s=o(e),v=null;return(0!==e.value.length||s!==!1||d!==!1||c!==!1)&&("true"!==e.getAttribute("data-basicPlaceholder")&&(t=d===!0?n:c===!0?l:e.getAttribute("placeholder")||null,null!==r&&r.length>0&&(t=r),null!==t&&(v=f(t),u.insertAdjacentHTML("beforeend",v),e.setAttribute("data-basicPlaceholder",!0),!0)))},c=function(e){var t=e.parentElement,r=t.querySelector(".basicPlaceholder__placeholder"),n=o(e);return n!==!0&&(null!==r&&(r.parentElement.removeChild(r),e.removeAttribute("data-basicPlaceholder-error"),e.removeAttribute("data-basicPlaceholder-warning"),e.removeAttribute("data-basicPlaceholder"),!0))},f=function(){var e=arguments.length<=0||void 0===arguments[0]?"":arguments[0];return'<div class="basicPlaceholder__placeholder">'+e+"</a>"}},{}]},{},[1])(1)});
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.basicPlaceholder=e()}}(function(){return function e(t,r,n){function l(i,o){if(!r[i]){if(!t[i]){var u="function"==typeof require&&require;if(!o&&u)return u(i,!0);if(a)return a(i,!0);var d=new Error("Cannot find module '"+i+"'");throw d.code="MODULE_NOT_FOUND",d}var c=r[i]={exports:{}};t[i][0].call(c.exports,function(e){var r=t[i][1][e];return l(r||e)},c,c.exports,e,t,r,n)}return r[i].exports}for(var a="function"==typeof require&&require,i=0;i<n.length;i++)l(n[i]);return l}({1:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=null,l=null,a=(r.init=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n=t.errorText||"Invalid",l=t.warningText||"Invalid";for(var r=0;r<e.length;++r){var a=e[r];d(a),a.oninput=u}return!0},function(e){var t=e.getAttribute("data-basicPlaceholder-error");return null!==t&&"false"!==t}),i=function(e){var t=e.getAttribute("data-basicPlaceholder-warning");return null!==t&&"false"!==t},o=function(e){var t=e.getAttribute("data-basicPlaceholder-persistent");return null!==t&&"false"!==t},u=function(){var e=this,t=a(e),r=i(e);!0===t&&c(e),!0===r&&c(e),e.value.length>0?d(e):c(e)},d=function(e){var t=null,r=e.getAttribute("data-basicPlaceholder-text"),u=e.parentElement,d=a(e),c=i(e),s=o(e),v=null;return(0!==e.value.length||!1!==s||!1!==d||!1!==c)&&("true"!==e.getAttribute("data-basicPlaceholder")&&(t=!0===d?n:!0===c?l:e.getAttribute("placeholder")||null,null!==r&&r.length>0&&(t=r),null!==t&&(v=f(t),u.insertAdjacentHTML("beforeend",v),e.setAttribute("data-basicPlaceholder",!0),!0)))},c=function(e){var t=e.parentElement,r=t.querySelector(".basicPlaceholder__placeholder");return!0!==o(e)&&(null!==r&&(r.parentElement.removeChild(r),e.removeAttribute("data-basicPlaceholder-error"),e.removeAttribute("data-basicPlaceholder-warning"),e.removeAttribute("data-basicPlaceholder"),!0))},f=function(){return'<div class="basicPlaceholder__placeholder">'+(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"")+"</a>"}},{}]},{},[1])(1)});
{
"name": "basicplaceholder",
"moduleName": "basicPlaceholder",
"version": "1.4.6",
"version": "1.4.7",
"authors": [

@@ -21,3 +21,3 @@ "Tobias Reich <tobias@electerious.com>"

"license": "MIT",
"homepage": "http://github.com/electerious/basicPlaceholder",
"homepage": "https://github.com/electerious/basicPlaceholder",
"repository": {

@@ -32,5 +32,5 @@ "type": "git",

"devDependencies": {
"@electerious/basictasks": "^1.4.0",
"@electerious/basictasks": "2.0.0",
"gulp": "^3.9.1"
}
}
# basicPlaceholder
Easy-to-use persistent placeholders for input fields. [Try it live on CodePen](http://codepen.io/electerious/pen/JdPJRe).
Easy-to-use persistent placeholders for input fields. [Try it live on CodePen](https://codepen.io/electerious/pen/JdPJRe).
![basicPlaceholder Screenshot](http://l.electerious.com/uploads/big/26e55552b2178cc210be4e79021de400.png)
![basicPlaceholder Screenshot](https://l.electerious.com/uploads/big/26e55552b2178cc210be4e79021de400.png)

@@ -21,18 +21,18 @@ ## About

We recommend to install basicPlaceholder using [Bower](http://bower.io/) or [npm](https://npmjs.com).
We recommend to install basicPlaceholder using [Bower](https://bower.io/) or [npm](https://npmjs.com).
bower install basicPlaceholder
npm install basicplaceholder
## Requirements
basicPlaceholder dependents on the following browser APIs:
basicPlaceholder depends on the following browser APIs:
- [classList](http://caniuse.com/#feat=classlist)
All of these APIs are capable of being polyfilled in older browser. Check the linked resources above to determine if you must polyfill to achieve your desired level of browser support.
All of these APIs are capable of being polyfilled in older browsers. Check the linked resources above to determine if you must polyfill to achieve your desired level of browser support.
## How to use
## Usage
Include the CSS file in the `head` and the JS file at the end of your `body`:
Include the CSS file in the `head` tag and the JS file at the end of your `body` tag:

@@ -44,3 +44,3 @@ ```html

Add inputs to your website and wrap `div`-elements with the class `basicPlaceholder` around them:
Add inputs to your website and wrap `div` elements with the class `basicPlaceholder` around them:

@@ -47,0 +47,0 @@ ```html

Sorry, the diff of this file is not supported yet

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