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

noliter

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

noliter

Write code with no literal and get tiny bundle

  • 0.8.5
  • npm
  • Socket score

Version published
Weekly downloads
7
decreased by-30%
Maintainers
1
Weekly downloads
 
Created
Source

build npm license

Noliter

Write code with no literal and get tiny bundle

Install

npm install noliter

API

Constants

Instead of literal, if you use constant, you can reduce your file size.
Please setting about uglify, then your constants will change to single alphabet.
Here's the supported constants.

Notifier

import { $, notifier, INPUT } from 'noliter';

const [setValue, addValueListener] = notifier();
const input1 = $(INPUT);
const input2 = $(INPUT);
addValueListener((value) => input1.value = value);
addValueListener((value) => input2.value = value);
setValue('');
setValue('some value');

DOM manipulation

get/set

You can get/set property of DOM with get/set method.

import { $, INPUT, CHECKED, DISABLED } from 'noliter';

const input = $(INPUT).set(
  CHECKED, true,
  DISABLED, true
);

input.get(CHECKED) === true;
input.get(DISABLED) === true;
add

This method appends multiple parameters as children.
You can pass string or element or instance.

import { $, DIV } from 'noliter';

$(DIV)
  .add(
    'text',
    document.createElement('div'),
    $(DIV)
  );
on

It's same with addEventListener method.

import { $, BUTTON, BLUR, FOCUS } from 'noliter';

$(BUTTON)
  .add('click me')
  .on(BLUR, () => console.log('blur'))
  .on(
    FOCUS,
    () => console.log('focus'),
    { passive: true }
  );

Keywords

FAQs

Package last updated on 09 Mar 2021

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