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

@eriice/pretty-code

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@eriice/pretty-code

This module is an effort to implement highlight code block in Angular project.

  • 0.0.19
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Pretty-code

This module is an effort to implement highlight code block in Angular project.

This module is seperated from the Angular.io. I follow the source code in custom-elements/code part and packaged secondary.

License

This software is provided free of charge and without restriction under the MIT License

Demo

example

Installation

Please make sure the follow packages have been introduced in your project cause this module is based on Angular-Material.

@angular/cdk
@angular/material
@angular/animations

This package is installable through NPM.

$ npm install @eriice/pretty-code --save

Usage

Example module

import { PrettyCodeModule } from "@eriice/pretty-code";

@NgModule({
  imports: [
    ...
    PrettyCodeModule
  ]
})

Example Template

// single code block
<app-code-example [config]="config"></app-code-example>

// multiple code block
<app-code-tabs [config]="config"></app-code-tabs>

Input property

PropertyTypeDefaultDescription
configConfignullUsed to configure code block display including language of code, header, linenum and the code block.
interface Config {
  code: string| null;
  language: string| null;
  linenums: boolean| number| string;
  header: string| null;
}

FAQs

Package last updated on 18 Feb 2019

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