npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@azinasili/bytes

v1.0.4

Published

Lightweight Sass mixin library to make development fun

Downloads

11

Readme

Bytes

A small mixin and function helper library for Sass projects.

Installation

With NPM:

npm install @azinasili/bytes --save

Install Bytes with Bower package manager:

bower install bytes --save

Import Bytes into your stylesheet:

@import "path/to/bytes/bytes";

It’s not recommended to add or modify files so that you can update them easily.

Documentation

Bytes uses Sassdoc for documentation. Docs can be generated via the command line using Grunt.

Install dependencies:

npm install

Generate and open docs in your browser:

grunt

Generate docs:

grunt docs

What's included with Bytes?

Functions

Mixins

Global settings

Here are all of Bytes global settings with their default value:

$bytes: (
  'animate-easing' : cubic-bezier(.4, 0, .2, 1),
  'animate-timing' : .4s,
  'black'          : rgb(0, 0, 0),
  'font-size'      : 16px,
  'media-path'     : '../assets',
  'white'          : rgb(255, 255, 255),
);

You can set your own global defaults. Create a $bytes variable containing any key/value you need.

$bytes: (
  'font-size'      : 14px,
  'media-path'     : '../../img',
);

Functions

get

$map: (
  'foo': 'bar',
);

.test {
  content: get($map, 'foo');
}

strip-unit

.test {
  line-height: strip-unit(2rem);
}

em function

.test {
  padding: em(6px 12px);
}

rem function

.test {
  padding: rem(6px 12px);
}

tint

.test {
  color: tint(#bada55, 15%);
}

shade

.test {
  color: shade(#bada55, 15%);
}

transparent

.test {
  color: transparent(#bada55, 85%);
}

chroma

.test {
  color: chroma(#bada55, -10%);
}

color

.test {
  color: color(#bada55, 10%, -35%);
}

dynamic-color

.test {
  color: dynamic-color(#bada55);
}

z-index function

$list: ('header', 'modal');

.test {
  z-index: z-index($list, 'modal');
}

.test {
  z-index: z($list, 'modal');
}

path

.test {
  background: path('kitten.jpg') no-repeat 0 0;
}

animate

.test {
  transition: animate(all, .5s);
}

Mixins

em mixin

.test {
  @include em(padding, 10px);
}

rem mixin

.test {
  @include rem(padding, 10px);
}

font-family

.test {
  @include font-family('Open Sans', '../fonts');
}

center

.test {
  @include center('both', 'absolute');
}

circle

.test {
  @include circle(20px, 10px);
}

hide-text

.test {
  @include hide-text();
}

opacity

.test {
  @include opacity(30%);
}

triangle

.test {
  @include triangle(20px, 10px, #bada55, 'bottom');
}

list-unstyled

.test {
  @include list-unstyled();
}

truncate

.test {
  @include truncate();
}

word-wrap

.test {
  @include word-wrap();
}

hidpi

.test {
  @include hidpi() {
    // CSS styles
  };
}

placeholder

.test {
  @include placeholder() {
    // CSS styles
  };
}

set

$map: (
  'background': black;
  'hover': (
    'color': white
  )
);

.test {
  @include set($map);

  &:hover {
    @include set($map, 'hover');
  }
}

width

.test {
  @include width(200px, 500px);
}

paper-depth

.test {
  @include paper-depth(3);
}

paper-ripple

.test {
  @include paper-ripple(black white);
}

z-index mixin

$list: ('header', 'modal');

.test {
  @include z-index($list, 'modal');
}

breakpoint-check

$map: (
  'mobile': 320px,
  'tablet': 740px,
  'laptop': 980px,
);

@include breakpoint-check($map);

TODO

  • Add testing suite