资源介绍
人的间隔
安装
npm install human-intervals
component install segmentio/human-intervals
例子
var humanize = require ( 'human-intervals' ) ;
var assert = require ( 'assert' ) ;
var values = [ 341 , 12 , 793 , 42 , 54 , 591 , 123 , 271 , 804 ] ;
var max = Math . max . apply ( Math , values ) ;
assert . deepEqual ( humanize ( { segments : 2 , value : max } ) . map ( format ) , [ '0' , '450' , '900' ] ) ;
as
- 上一篇: Intervals.jl:不可迭代范围
- 下一篇: Music-Intervals:音乐间隔的数学分解