File tree 2 files changed +19
-10
lines changed
2 files changed +19
-10
lines changed Original file line number Diff line number Diff line change 510
510
}
511
511
} else return AsciiArt . Font . create ( str , font , callback ) ;
512
512
}
513
- AsciiArt . style = function ( text , styles ) {
514
- return Ansi . codes ( text , styles ) ;
513
+ AsciiArt . style = function ( text , styles , terminate ) {
514
+ return Ansi . codes ( text , styles , terminate ) ;
515
515
}
516
516
AsciiArt . Image . newReturnContext = function ( options ) {
517
517
var chain = fontChain . apply ( { } ) ;
535
535
return AsciiArt . Graph . create ( options , callback ) ;
536
536
}
537
537
538
+ AsciiArt . use = function ( interfaceName , implementation ) {
539
+ switch ( interfaceName . toLowerCase ( ) ) {
540
+ case 'request' :
541
+ AsciiArt . Image . useRequest ( implementation ) ;
542
+ AsciiArt . Artwork . useRequest ( implementation ) ;
543
+ break ;
544
+ case 'artwork' :
545
+ AsciiArt . Artwork = implementation ;
546
+ break ;
547
+ default : throw new Error ( 'Unknown interface: ' + interfaceName )
548
+ }
549
+ }
550
+
538
551
AsciiArt . artwork = function ( options , callback ) {
539
552
if ( ! callback ) {
540
553
var chain = fontChain . apply ( { } ) ;
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " ascii-art" ,
3
3
"homepage" : " https://github.com/khrome/ascii-art" ,
4
- "version" : " 2.7 .0" ,
4
+ "version" : " 2.8 .0" ,
5
5
"main" : " art.js" ,
6
6
"description" : " Ansi codes, figlet fonts, and ascii art. 100% JS" ,
7
7
"keywords" : [
44
44
"url" : " git://github.com/khrome/ascii-art.git"
45
45
},
46
46
"dependencies" : {
47
- "ansi-to-html" : " ^0.6.14" ,
48
- "ascii-art-ansi" : " 1.3.7" ,
47
+ "ascii-art-ansi" : " 1.4.0" ,
49
48
"ascii-art-font" : " 1.0.2" ,
50
49
"ascii-art-graph" : " 0.1.1" ,
51
- "ascii-art-image" : " 1.3.5 " ,
50
+ "ascii-art-image" : " 1.4.0 " ,
52
51
"ascii-art-table" : " 1.0.1" ,
53
52
"ascii-art-utf" : " 0.0.1" ,
54
- "browser-request" : " 0.3.3" ,
55
- "canvas" : " 1.6.9" ,
56
53
"dirname-shim" : " 1.0.0" ,
57
- "strangler" : " ^1.1.2" ,
58
- "yargs" : " *"
54
+ "strangler" : " ^1.1.2"
59
55
},
60
56
"devDependencies" : {
61
57
"ascii-art-docs" : " ^0.0.1" ,
You can’t perform that action at this time.
0 commit comments