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

pp-rut

v1.0.3

Published

Validate the Chilean R.U.T. and its verification digit

Readme

pp-rut

For more information Wikipedia Link

Try online

pp-rut.netlify.app

Getting Started

In the web project include pp-rut with:

<!--no dependencies used nd file-->
<script src="https://cdn.jsdelivr.net/npm/pp-rut/dist/pp-rut.nd.min.js" ></script>

Or

<script src="https://cdn.jsdelivr.net/npm/pp-is/dist/pp-is.min.js" ></script>
<script src="https://cdn.jsdelivr.net/npm/pp-rut/dist/pp-rut.min.js" ></script>

Or

Install

npm i pp-rut --save

How to use ?

formats that work:

ppRut(30686957) //work
ppRut(30686957,"4") //work
ppRut("30686957","") //work
ppRut("30.686.957") //work
ppRut("30.686.957 4") //work
ppRut("30.686.957-4") //work
ppRut("30 686 957 4") //work
ppRut("30.686 957 5","4") //In this case, number 4 takes priority over number 5.
ppRut("*****30.....686.****957 5","4") //Other very unlikely formats to work
const rut = ppRut(30918041,11)
console.log( rut.checkDigit("0") ) // true
console.log( rut.format() )// 30.918.041-0
const rut = ppRut(30918050,10)
console.log( rut.checkDigit("k") ) //true
console.log( rut.format() ) // 30.918.050-k
const rut = ppRut("30686957")
console.log( rut.checkDigit("4") ) //true
console.log( rut.format() ) // 30.686.957-4
const rut = ppRut("30686957")
console.log( rut.checkDigit("4") ) //true
console.log( rut.format() ) // 30.686.957-4
const rut = ppRut("30686957 5")
console.log( rut.checkDigit() ) //false
console.log( rut.format() ) // 30.686.957-4
const rut = ppRut("30686957 4")
console.log( rut.checkDigit("5") ) //false
console.log( rut.format() ) // 30.686.957-4
const rut = ppRut("30686957 5")
console.log( rut.checkDigit("4") ) //true
console.log( rut.format() ) // 30.686.957-4

Properties

body

R.U.T body clean

digit

R.U.T digit to check

Methods

getDigit

Obtain the check digit

const rut = ppRut("30686957 4")
console.log( rut.getDigit() ) // "4"

checkDigit

Check the digit against the given value and if it does not exist, compare it with the value found.

const rut = ppRut("30686957 5")
console.log( rut.checkDigit(4) ) // true
console.log( rut.checkDigit("4") ) // true
console.log( rut.checkDigit() ) // false

format

Create an output format with two variables, one for the thousands separator and the second for the check digit separator.

const rut = ppRut("30686957 4")
console.log( rut.format(""," ") ) // 30686957 4
console.log( rut.format("."," ") ) // 30.686.957 4
console.log( rut.format("","") ) // 306869574

Test

A test with quickjs :

qjsc -o test test.js
import "./dist/pp-rut.nd.min.js"
const time_begin = Date.now();
let begin = 1000000 , end = 99999999;
while(begin<end){
	const rut = ppRut(begin)
	console.log( rut.format() )
	begin++;
}
const ms = Date.now() - time_begin
console.log("Execute time : "+ms+" ms");
qjsc -o test test.js
./test

27.3375 Minutes

99.999.996-4
99.999.997-2
99.999.998-0
Execute time : 1640250 ms

Need something faster?

librut c++