UNPKG
charset-pl
Version:
latest (2.0.0)
2.0.0
1.0.0
0.4.0
0.3.0
0.2.1
0.2.0
0.1.1
0.1.0
0.0.1
polish charset? idk
charset-pl
/
dist
/
lib
/
tools
/
toBinary.js
11 lines
(10 loc)
•
228 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
"use strict"
;
Object
.
defineProperty
(
exports
,
"__esModule"
, {
value
:
true
});
function
toBinary
(
n, d
) {
var
b = n.
toString
(
2
);
while
(b.
length
< d) { b =
'0'
+ b; }
return
b; }
exports
.
default
= toBinary;