
Product
Introducing Tier 1 Reachability: Precision CVE Triage for Enterprise Teams
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
@devsisters/flex-workblock
Advanced tools
FLEX의 근무시간을 Block과 BlockBundle이라는 개념으로 재구성하여, 각종 근무시간 계산을 도와줍니다!
근무내역
입니다.근무내역
을 지원하지 않으며, 현재 사내에서 아래 방법들로 이용중입니다.
근무내역
들을 우리만의 Block
과 BlockBundle
이라는 개념으로 재정의하고, 근무시간 관련 계산을 돕는 모듈들을 이 패키지에서 제공합니다.export declare class Block {
startAt: Date; // 시작 시간
endAt: Date; // 종료 시간
type: BlockType; // 근무, 비근무, 휴게 중 하나
constructor(startAt: Date, endAt: Date, type: BlockType);
// 블럭의 길이(기간)
// ex) 13:00~14:00 블럭의 duration은 { hours: 1 }
get duration(): Duration;
//interval과 겹치는 블럭의 길이(기간)
//ex) 13:00~14:00 블럭과
// { start: "13:20", end: "14:10" } interval의 overlappedDuration은
// { minutes: 50 }
overlappedDuration(interval: Interval): Duration;
// 12:00~13:00인 휴게 블럭인 경우 "Lunch"를 반환
// 이외에는 null
get subtype(): BlockSubtype | null;
}
BlockBundle을 처음 생성하였을때 (06:00~18:00)
06:00~18:00 미근무 블럭
]BlockBundle.addBlock(09:00~17:00 근무 블럭
) 실행시
06:00~09:00 미근무 블럭
, 09:00~17:00 근무 블럭
, 17:00~18:00 미근무 블럭
]12:00~13:00 근무 블럭
) 실행시blocks: [06:00~09:00 미근무 블럭
, 09:00~12:00 근무 블럭
, 12:00~13:00 휴게 블럭
, 13:00~17:00 근무 블럭
, 17:00~18:00 미근무 블럭
]
이런식으로 정렬됩니다.
export declare class BlockBundle {
startAt: Date; //시작 시간
endAt: Date; //종료 시간
blocks: Block[]; //Block들
constructor(startAt: Date, endAt: Date);
addBlock(block: Block): void; //Block 한개 추가
addBlocks(blocks: Block[]): void; //Block 여러개 추가
popBlock(indexOf: number): void; //Block 한개 제거
popBlocks(indexFrom: number, count: number): void; //Block 여러개 제거
getBlockAt(date: Date): Block; //해당 시간에 겹쳐있는 Block 반환
getBlocksBetween(from: Date, to: Date): Block[]; //해당 시간들 사이에 겹쳐있는 Block들 반환
get didWork(): boolean; //이날의 근무기록이 있는지 T/F
}
declare const _default: {
//duration을 분 단위로 환산해줍니다
//주의: hours, minutesd외에는 무시합니다 TODO
durationToMinutes(duration: Duration): number;
//코어타임 미이수 시간을 계산합니다
//ex) 221031 06:00~ 221101 06:00의 BlockBundle을 만들어놓고, 10:00~16:00을 코어타임 시작, 종료 시간으로 넘겨주면
//그날의 코어타임 미이수 시간을 반환함
getMissedCoreTime(bundle: BlockBundle, coretimeStartAt: Date, coretimeEndAt: Date): Duration;
//지각 여부와 지각 시간을 계산합니다
//ex) 221031 06:00~ 221101 06:00의 BlockBundle을 만들어놓고, 10:00~16:00을 코어타임 시작, 종료 시간으로 넘겨주면
//그날의 지각 여부와 지각 시간을 반환함
getLateInfo(bundle: BlockBundle, coretimeStartAt: Date, coretimeEndAt: Date): functions.LateInfo;
};
FAQs
FLEX의 근무시간을 Block과 BlockBundle이라는 개념으로 재구성하여, 각종 근무시간 계산을 도와줍니다!
The npm package @devsisters/flex-workblock receives a total of 0 weekly downloads. As such, @devsisters/flex-workblock popularity was classified as not popular.
We found that @devsisters/flex-workblock demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
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.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.