Skip to content

Commit fa626ad

Browse files
Release k8-1.2 (r137)
1 parent 22cb705 commit fa626ad

File tree

3 files changed

+17
-16
lines changed

3 files changed

+17
-16
lines changed

NEWS.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
1-
Release 1.2-r135 (27 May 2024)
1+
Release 1.2-r137 (27 May 2024)
22
------------------------------
33

44
New functions:
55

6-
* `read_file()`: read an entire file as an ArrayBuffer
7-
* `decode()`: convert an ArrayBuffer/Bytes object to a string
8-
* `encode()`: convert a string to an ArrayBuffer
6+
* `k8_read_file()`: read an entire file as an ArrayBuffer
7+
* `k8_decode()`: convert an ArrayBuffer/Bytes object to a string
8+
* `k8_encode()`: convert a string to an ArrayBuffer
9+
* `k8_revcomp()`: reverse complement a DNA sequence
910

1011
Improved:
1112

12-
* `Bytes.read()`: more flexible API to read the rest of a file
13+
* `Bytes.read()`: allow to read the rest of a file
1314

14-
(1.2: 27 May 2024, r135)
15+
(1.2: 27 May 2024, r137)
1516

1617

1718

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,20 +71,20 @@ function exit(code: number)
7171
function load(fileName: string)
7272

7373
// Read entire file as an ArrayBuffer
74-
function read_file(fileName: string): ArrayBuffer
74+
function k8_read_file(fileName: string): ArrayBuffer
7575

7676
// Decode $buf to string under the $enc encoding; only "utf-8" is supported for now
7777
// Missing or unknown encoding is treated as Latin-1
78-
function decode(buf: ArrayBuffer|Bytes, enc?: string): string
78+
function k8_decode(buf: ArrayBuffer|Bytes, enc?: string): string
7979

8080
// Encode $str into an ArrayBuffer
81-
function encode(str: string, enc?: string): ArrayBuffer
81+
function k8_encode(str: string, enc?: string): ArrayBuffer
8282

8383
// Reverse complement a DNA sequence in string
84-
function revcomp(seq: string): string
84+
function k8_revcomp(seq: string): string
8585

8686
// Reverse complement a DNA sequence in place
87-
function revcomp(seq: ArrayBuffer|Bytes)
87+
function k8_revcomp(seq: ArrayBuffer|Bytes)
8888

8989
// Get version string
9090
function k8_version()

k8.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2424
SOFTWARE.
2525
*/
26-
#define K8_VERSION "1.1-r136-dirty"
26+
#define K8_VERSION "1.2-r137"
2727

2828
#include <stdlib.h>
2929
#include <stdint.h>
@@ -911,10 +911,10 @@ static v8::Local<v8::Context> k8_create_shell_context(v8::Isolate* isolate)
911911
global->Set(isolate, "warn", v8::FunctionTemplate::New(isolate, k8_warn));
912912
global->Set(isolate, "exit", v8::FunctionTemplate::New(isolate, k8_exit));
913913
global->Set(isolate, "load", v8::FunctionTemplate::New(isolate, k8_load));
914-
global->Set(isolate, "read_file", v8::FunctionTemplate::New(isolate, k8_read_file));
915-
global->Set(isolate, "encode", v8::FunctionTemplate::New(isolate, k8_encode));
916-
global->Set(isolate, "decode", v8::FunctionTemplate::New(isolate, k8_decode));
917-
global->Set(isolate, "revcomp", v8::FunctionTemplate::New(isolate, k8_revcomp));
914+
global->Set(isolate, "k8_read_file", v8::FunctionTemplate::New(isolate, k8_read_file));
915+
global->Set(isolate, "k8_encode", v8::FunctionTemplate::New(isolate, k8_encode));
916+
global->Set(isolate, "k8_decode", v8::FunctionTemplate::New(isolate, k8_decode));
917+
global->Set(isolate, "k8_revcomp", v8::FunctionTemplate::New(isolate, k8_revcomp));
918918
global->Set(isolate, "k8_version", v8::FunctionTemplate::New(isolate, k8_version));
919919
{ // add the 'Bytes' object
920920
v8::HandleScope scope(isolate);

0 commit comments

Comments
 (0)