Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


                <section class="container">
  <h1>Форматирование: адрес в формате Почты России</h1>
  <input id="address" name="address" type="text" />



                input {
  font-size: 16px;
  padding: 4px;


 * Объединяет элементы массива через разделитель. При этом игнорирует пустые элементы.
function join(arr /*, separator */) {
  var separator = arguments.length > 1 ? arguments[1] : ", ";
  return arr.filter(function(n){return n}).join(separator);

function makeAddressString(address){
  return join([
    join([address.street_type, address.street], " "),
          address.block_type, address.block], " "),
    join([address.flat_type, address.flat], " "),
    join([address.settlement_type, address.settlement], " "),
    ( !== address.region && join([address.city_type,], " ") || ""),
    join([address.area_type, address.area], " "),
    join([address.region_type, address.region], " ")
 * Выводит подсказки в формате "улица, дом, город, область"
function formatResult(value, currentValue, suggestion) {
  var addressValue = makeAddressString(;
  suggestion.value = addressValue; 
  return addressValue;
 * Заполняет содержимое текстбокса в формате "улица, дом, город, область"
function formatSelected(suggestion){
  var addressValue = makeAddressString(;
  return addressValue;

  token: "7fd18aaabd7d53ffa4846e4521c1f736c13490eb",
  type: "ADDRESS",
  formatResult: formatResult,
  formatSelected: formatSelected,