Registry / productivity / period-newline

period-newline

JSON →
library0.1.0jsnpmunverified

period-newline is a tiny zero-dependency text formatter that inserts a newline after every period. Version 0.1.0 is the current stable release. It is a simple utility with no significant release cadence. Key differentiator: minimal, pure format transformations for plaintext.

npm install period-newline
INSTALL
IMPORT
SIG · PERIOD-NEWLINE
P
period-newline
productivityjavascriptv0.1.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

periodNewline
import { periodNewline } from 'period-newline'
import periodNewline from 'period-newline'
Default export is not available; use named import.
periodNewline
const { periodNewline } = require('period-newline')
const periodNewline = require('period-newline')
CommonJS requires destructuring the named export.
periodNewline
const periodNewline = require('period-newline').periodNewline
Alternative CommonJS syntax, but destructured import is clearer.

Demonstrates importing and using periodNewline to insert newlines after periods.

import { periodNewline } from 'period-newline'; const result = periodNewline('Hello. World. Goodbye.'); console.log(result); // Hello. // World. // Goodbye.
Debug
Known issues
gotchaNamed export only; does NOT have a default export.
fix
Use `import { periodNewline } from 'period-newline'` or destructure require.
affects: *
gotchaTrailing newline after last period – the function always appends a newline if input ends with period.
fix
Consider trimming or handling output if this behavior is undesired.
affects: *
gotchaOnly inserts newline after period (.), not after other punctuation like ? or !.
fix
Use a more comprehensive formatter if other punctuation is needed.
affects: *
Errors
Common errors & fixes
TypeError: periodNewline is not a function
Using default import instead of named import.
fix
Change `import periodNewline from 'period-newline'` to `import { periodNewline } from 'period-newline'`.
periodNewline is not a function
CommonJS require without destructuring.
fix
Use `const { periodNewline } = require('period-newline')`.
Upgrade
Version history
0.1.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
28 hits · last 30 days
node
26
OpenAI (training)
1
Resources
period-newline — npm install period-newline · libregistry